Skip to content

chore: replace em dashes in source and output strings (#1283) - #1285

Merged
sonukapoor merged 4 commits into
OWASP:mainfrom
prx-my:chore/issue-1283-em-dashes
Oct 17, 2026
Merged

sonukapoor merged 4 commits into
OWASP:mainfrom
prx-my:chore/issue-1283-em-dashes

Conversation

@prx-my

@prx-my prx-my commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Closes #1283.

What changed

  • Replaced all 54 em dashes across 17 files under src/ (43 in emitted strings, 11 in comments/JSDoc):
    • Emitted clauses use : where a clause follows (e.g. 1 packument fetch failed: remediation guidance may be incomplete.), ;/period where a colon read poorly
    • HTML <title> separators use - (CVE Lite - <project>)
    • Comments and JSDoc use a plain -
  • Updated the 8 tests that assert these strings exactly (multi-folder-scan, scanner-cache, html-reporter) after reading each assertion
  • Also cleaned repo docs: README.md (10), docs/output-before-after.md (8), scripts/clean-dist.mjs (1). The docs/ sample output now matches current source (printers.ts colon, formatters.ts hyphens)
  • Verified src/skills/content.ts output by eye (shipped AI-assistant docs, least coverage)

Verification

  • grep -rn "—" src --include="*.ts" returns nothing
  • npm test passes (163 suites, 2249 tests)
  • npm run build is clean

Notes

  • tests/output.test.ts:2944 intentionally keeps not.toContain("—") as the convention guard.
  • Out of scope for this PR: website/docs/ (859) and examples/ (68) still contain em dashes; can be a follow-up docs PR.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 20:24
@prx-my
prx-my requested a review from sonukapoor as a code owner October 3, 2026 20:24

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@prx-my

prx-my commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Update: this branch has been refreshed with the latest main. It is no longer behind and now only awaits the required review/status checks before it can merge.

@prx-my
prx-my force-pushed the chore/issue-1283-em-dashes branch from 4d8e5cf to c64488b Compare October 8, 2026 11:47
Replace all 54 em dashes across 17 files under src/ with colons, hyphens, or periods, and update the tests that assert those strings. Also clean README.md, docs/output-before-after.md, and scripts/clean-dist.mjs. Comments and JSDoc use a plain hyphen.
@prx-my
prx-my force-pushed the chore/issue-1283-em-dashes branch from c64488b to 47de9ac Compare October 8, 2026 11:50

@sonukapoor sonukapoor left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Exactly the scope of #1283 and nothing beyond it: 54 removed across the 17 files it counted, and src/docs/CONTRIBUTING.md correctly left alone since the issue's count excludes it. 2319 tests, build clean.

I went looking for the one way a mechanical replacement like this bites, a dash sitting somewhere parsed rather than printed, and there is nothing: every changed occurrence is inside a string literal, a template literal or a comment. Three lines tripped my own crude filter and all three are false positives, a trailing comment on a line containing === and the two HTML <title> lines.

Approved. The dozen left in CONTRIBUTING.md are our own writing and our own follow-up, not yours.

@sonukapoor

Copy link
Copy Markdown
Collaborator

Same situation as #1269, where I have put the detail. self-scan is red here because the branch predates #1307's handlebars bump on main, not because of anything in the change. A rebase onto current main should take it green.

The sweep itself is complete: src comes back clean of em dashes on your branch and still clean after merging into current main, with the suite and the build green on that merge result.

@sonukapoor
sonukapoor merged commit f061c6c into OWASP:main Oct 17, 2026
6 checks passed
@sonukapoor

Copy link
Copy Markdown
Collaborator

Merged, thank you @prx-my.

Worth saying what made this one easy to take: you updated every assertion in lockstep with the string it covers, so the suite stayed at full green the whole way rather than needing anything reconciled at the end. On a change touching thirty-six files that is the difference between a review and an archaeology session.

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.

chore: replace the em dashes in shipped source and output strings

3 participants