You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doc-sync: pkg/linters/doc.go says "52 active analyzers" but 53 are registered — trimleftright is omitted #46527
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).
Activity
github-actions commentedon Jul 19, 2026
🍪 Issue Monster selected this for Copilot
I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.
If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.
Om nom nom! 🍪