Description
pkg/linters/doc.go header and bullet list say 52 analyzers, but cmd/linters/main.go registers 53. The missing entry is trimleftright. This is a recurring drift class (previously fixed in #46131, #45185, #40436) that keeps reoccurring as new linters are added.
A count-parity test guard would prevent future drift.
Suggested Changes
- Add
trimleftright bullet to pkg/linters/doc.go
- Bump the header count from 52 to 53
- Add a
go test assertion that len(doc bullets) == len(registered analyzers) in cmd/linters/
Files Affected
pkg/linters/doc.go (header + bullet list)
cmd/linters/main.go:76-128 (registration)
- New test file:
cmd/linters/doc_parity_test.go (or similar)
Success Criteria
doc.go count matches registered count
trimleftright appears in the bullet list
- A test fails if the counts diverge in future
Source
Extracted from Sergo Report #46528 (Finding 2, issue #46527)
Priority
Low — Documentation drift; trivial effort
🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · 40.8 AIC · ⌖ 6.1 AIC · ⊞ 7K · ◷
Description
pkg/linters/doc.goheader and bullet list say 52 analyzers, butcmd/linters/main.goregisters 53. The missing entry istrimleftright. This is a recurring drift class (previously fixed in #46131, #45185, #40436) that keeps reoccurring as new linters are added.A count-parity test guard would prevent future drift.
Suggested Changes
trimleftrightbullet topkg/linters/doc.gogo testassertion thatlen(doc bullets) == len(registered analyzers)incmd/linters/Files Affected
pkg/linters/doc.go(header + bullet list)cmd/linters/main.go:76-128(registration)cmd/linters/doc_parity_test.go(or similar)Success Criteria
doc.gocount matches registered counttrimleftrightappears in the bullet listSource
Extracted from Sergo Report #46528 (Finding 2, issue #46527)
Priority
Low — Documentation drift; trivial effort