Summary
The package doc-comment in pkg/linters/doc.go is out of sync with the analyzer registry again. It declares 52 active analyzers and lists 52 bullets, but cmd/linters/main.go registers 53. The missing analyzer is trimleftright.
Evidence
pkg/linters/doc.go:3 — header reads // All 52 active analyzers: and the file contains exactly 52 // - <name> — ... bullet lines.
cmd/linters/main.go:76-128 — 53 *.Analyzer entries are registered.
trimleftright appears in the registry (main.go:125) and ships as a package (pkg/linters/trimleftright/), but has no bullet in doc.go (grep for trimleftright in doc.go returns 0 matches).
Impact
Low severity but recurring: the doc comment is the human-facing catalog of active linters, and a persistent off-by-N undermines its usefulness. This is the same class of drift previously fixed via #46131 (45→51), #45185 (44→45), and #40436 (29→30).
Recommendation
- Add a
trimleftright bullet to the list in pkg/linters/doc.go, e.g.:
// - trimleftright — flags strings.TrimLeft/TrimRight calls with a multi-character literal cutset where TrimPrefix/TrimSuffix was likely intended
- Update the header count to
// All 53 active analyzers:.
- Consider a small
go test guard that asserts len(doc bullets) == len(registered analyzers) to prevent recurrence (this drift has now been filed 4+ times).
Validation checklist
Effort: trivial.
References: §29673838676
Generated by 🤖 Sergo - Serena Go Expert · 326.4 AIC · ⌖ 11.1 AIC · ⊞ 5.8K · ◷
Summary
The package doc-comment in
pkg/linters/doc.gois out of sync with the analyzer registry again. It declares 52 active analyzers and lists 52 bullets, butcmd/linters/main.goregisters 53. The missing analyzer istrimleftright.Evidence
pkg/linters/doc.go:3— header reads// All 52 active analyzers:and the file contains exactly 52// - <name> — ...bullet lines.cmd/linters/main.go:76-128— 53*.Analyzerentries are registered.trimleftrightappears in the registry (main.go:125) and ships as a package (pkg/linters/trimleftright/), but has no bullet indoc.go(grep fortrimleftrightindoc.goreturns 0 matches).Impact
Low severity but recurring: the doc comment is the human-facing catalog of active linters, and a persistent off-by-N undermines its usefulness. This is the same class of drift previously fixed via #46131 (45→51), #45185 (44→45), and #40436 (29→30).
Recommendation
trimleftrightbullet to the list inpkg/linters/doc.go, e.g.:// - trimleftright — flags strings.TrimLeft/TrimRight calls with a multi-character literal cutset where TrimPrefix/TrimSuffix was likely intended// All 53 active analyzers:.go testguard that assertslen(doc bullets) == len(registered analyzers)to prevent recurrence (this drift has now been filed 4+ times).Validation checklist
doc.goheader count equalsgrep -c 'Analyzer,' cmd/linters/main.go.doc.gobullet list.Effort: trivial.
References: §29673838676