Skip to main content
← Back to list
01Issue
BugOpenSwamp CLIPublic
AssigneesNone

Relationships

#3153 extension push: a swamp-quality-ignore directive after a comment holding an apostrophe is silently ignored

Opened by skunk-ape · 10/7/2026

Problem

findDirectiveStart in src/domain/extensions/extension_acceptances.ts checks whether the directive's // opener is inside quotes by scanning the whole line prefix for quote characters. An apostrophe in an earlier line comment counts as an open string, so a directive after it is not recognised:

new Deno.Command(cmd); // don't inline // swamp-quality-ignore deno-command

parses zero directives: the finding stays unaccepted and nothing says why (no invalid-acceptance, no stale-acceptance).

Notes

Found while working on swamp-club#3107. A fix that treats an opener after an unquoted // as inside a comment was tried and reverted there: quote-only tracking reads a regex literal holding two slashes as a line comment (const re = /a//; const s = "it's // swamp-quality-ignore x"), which would turn string text into a directive. A fix needs real tokenisation (the Babel parser is already used by dynamic_code_detector.ts and commentSites), or at least an invalid-acceptance warning when the keyword follows a comment opener but is not recognised.

Since #3107 the report suggests every source acceptance on its own line above, so this only affects hand-written trailing directives.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

10/7/2026, 7:51:52 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.