Files
james.maesandClaude Opus 4.7 102cb562f2 fix(05-review): WR-01 strip block comments and strings before grep
The pre-WR-01 lint stripped only LEADING `//` comment lines, so a
string literal like `let docs = "Use NSApp.run() to start"` or a
block comment `/* runModal is forbidden */` would false-positive
because the regex matched bare identifiers inside content the parser
wouldn't even reach.

Tightens both:
1. PATTERN now requires a call-site shape (`.method(` or `Type.method(`)
   so bare identifiers don't trigger.
2. Pre-strip pass via sed: strip line comments, block comments
   (whole-line delete), and string literals before grep.

Adds string-literal-modal-mentions.swift fixture covering:
- runModal inside a string literal
- runModal inside a block comment
- runModal in a trailing line comment
None of these should trigger; the lint now correctly accepts the
fixture (exit 0).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-25 16:23:59 -05:00
..