Skip to content

fix(site): use a set lookup for locale routes - #1520

Merged
BryanFRD merged 1 commit into
mainfrom
fix/sonar-gate-1519
Nov 28, 2026
Merged

BryanFRD merged 1 commit into
mainfrom
fix/sonar-gate-1519

Conversation

@BryanFRD

Copy link
Copy Markdown
Contributor

Fixes the remaining new Sonar violation (typescript:S7765) in app.config.ts.

Closes #1519

@BryanFRD
BryanFRD enabled auto-merge (squash) November 28, 2026 15:05

@ferrfleet-interne ferrfleet-interne Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to merge. The code review approved with no findings.

site/src/app/app.config.ts: LOCALES.some((locale) => route.path === locale) becomes a lookup in a ReadonlySet<string | undefined>. Behaviour is unchanged. Matching is still exact string equality, and a route with an undefined path never matches. The string | undefined type on the set lets route.path go straight to has() without a cast.

Findings: none. The formal verification step was not run for this pull request.

@BryanFRD
BryanFRD merged commit bd8f838 into main Nov 28, 2026
37 checks passed
@BryanFRD
BryanFRD deleted the fix/sonar-gate-1519 branch November 28, 2026 15:06
ferrflow Bot added a commit that referenced this pull request Nov 28, 2026
## [2026.11.41] - 2026-11-28

### Bug Fixes

- fix(site): use a set lookup for locale routes (#1520)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sonar : 1 nouvelle violation restante sur ferrflow après #1514

1 participant