Commit fe88f1b
fix(ego-lint): tighten R-SLOP-38 to reduce over-long identifier false positives (#82)
## Summary
- Tightened R-SLOP-38 main pattern to exclude underscore-containing
identifiers (`[a-zA-Z0-9]` instead of `\w`), since snake_case names
follow GLib/C convention and are never AI-generated in JavaScript
- Expanded guard-pattern to suppress domain-specific suffixes:
`Function`, `Callback`, `Handler`, `Listener` (15+ chars), and `Id` (20+
chars) — common in GNOME/GLib naming conventions
- Eliminates FPs on: blur-my-shell (`dash_not_already_destroyed`),
dash-to-panel (`sortWindowsCompareFunction`,
`taskbarBoxAllocationChangedId`), and similar descriptive identifiers in
v-shell (8 hits)
## Test plan
- [x] New fixture `slop-long-id-guard@test` verifies guarded cases
(Function suffix, Id suffix, Handler suffix) are suppressed while
AI-style verbose names still fire
- [x] Existing `slop-long-params@test` still fires (camelCase TP
preserved)
- [x] Existing `long-param-default@test` still suppressed (default param
guard still works)
- [x] Existing `compiled-ts-extension@test` still SKIPped
- [x] Full test suite: 538 passed, 0 failed
Closes #71
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 4d00563 commit fe88f1b
File tree
6 files changed
+55
-6
lines changed- rules
- skills/ego-lint/references
- tests
- assertions
- fixtures/slop-long-id-guard@test
6 files changed
+55
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2470 | 2470 | | |
2471 | 2471 | | |
2472 | 2472 | | |
2473 | | - | |
2474 | | - | |
| 2473 | + | |
| 2474 | + | |
2475 | 2475 | | |
2476 | | - | |
2477 | | - | |
| 2476 | + | |
| 2477 | + | |
2478 | 2478 | | |
2479 | 2479 | | |
2480 | 2480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments