Files
poli0981andClaude Opus 5.5 dfeefeb330 fix(web): act on SonarCloud's findings in web/
- Regexes that backtracked quadratically (typescript:S8786) are linear:
  chart colour tokens (trimmed, no \s* at the ends), the review percentage
  (up to three digits, from the start of a run) and label ([^()]+), the
  legal pages' title, the admin router's trailing slashes and the image
  route's capsule path (both without a regex), base64url padding
  (replaceAll; "=" is only ever trailing) and the admin mock. Checked
  against the old forms on random input: the percentage and the colours
  agree everywhere, the label and the title only differ on nested
  parentheses and blank "#" lines, which no summary or document has.
  New utils.test.ts pins the review parsing.
- Bare .sort() on strings (typescript:S2871) becomes .sort(byCodeUnit), a
  new shared/sort.ts that states the code-unit order those lists always had.
  Not localeCompare: the admin build id hashes this order. The sitemap is
  byte-identical.
- Number.parseInt / Number.parseFloat / Number.NaN (typescript:S7773).
- admin.css puts its @imports before @source (css:S8778); the emitted
  stylesheet is byte-identical.
- The raw U+FEFF inside removal.ts's split regex is written as an escape.
- normalizeLink, exported and called from nowhere, is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 09:32:00 +07:00
..