Commit fc10806
fix(ego-lint): skip JSDoc block comments in R-WEB-06 document.* check (#150)
## Summary
- Add `skip-comments: true` to R-WEB-06 (`\bdocument\.` pattern) so it
no longer matches inside JSDoc `/** ... */` block comments or `//`
single-line comments
- No new infrastructure needed — `apply-patterns.py` already supports
`skip-comments: true` with full block-comment state tracking
## Motivation
Field testing forge (2026-03-22) surfaced a false positive:
```
lib/css/index.js:439: DOM APIs (document.*) are not available in GJS
```
Line 439 is a JSDoc comment: `* Parse document.` — the word appears as
English prose in a vendored CSS parser (`reworkcss/css`), not as actual
DOM API usage. The file contains zero real `document.*` calls, making
this a pure false positive.
## Test Plan
- Updated `tests/fixtures/web-apis/extension.js` with a JSDoc comment
containing `document.` (lines 3–6) plus the existing real
`document.querySelector()` call
- Added `assert_output_count` assertion verifying R-WEB-06 fires
**exactly once** (real call only, JSDoc skipped)
- Baseline: 567 passed, 125 failed → after fix: 568 passed, 125 failed
(+1 pass, 0 new failures)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Solomon <sol@nanoclaw.dev>1 parent 715519f commit fc10806
File tree
3 files changed
+7
-1
lines changed- rules
- tests
- fixtures/web-apis
3 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | | - | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
126 | 127 | | |
127 | 128 | | |
128 | 129 | | |
| |||
0 commit comments