Commit 8039de4
Solomon
fix(rules): skip JSDoc block comments in R-WEB-06 (document.* check)
Add `skip-comments: true` to R-WEB-06 so the `\bdocument\.` pattern
is not matched inside JSDoc `/** ... */` block comments or single-line
`//` comments.
This eliminates a false positive found during field testing of forge:
`lib/css/index.js:439` contains `* Parse document.` in a JSDoc block
comment, which triggered a blocking FAIL on a vendored CSS parser with
no actual DOM API calls.
`skip-comments: true` is already supported by `apply-patterns.py`
(block-comment state tracking added in a prior commit). No new
infrastructure needed — this is a one-line rule configuration change.
Test: add JSDoc comment containing `document.` to `web-apis` fixture
and assert R-WEB-06 fires exactly once (real call only, not comment).
Fixes: forge field test FP (2026-03-22)1 parent e74c508 commit 8039de4
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