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: linters/doc.go still says "All 24 active analyzers" after two new linters (hardcodedfilepath, timesleepnocontext) land
[Content truncated due to length] #38787
Two new analyzers landed since the last doc sync — hardcodedfilepath (#38742) and timesleepnocontext (#38704) — but the package-level documentation and the spec test were not fully updated. The three sources of truth now disagree:
This is the recurring new_linter_doc_lag pattern (previously fixed by #37740 lenstringzero, #38028 sortslice).
Evidence
cmd/linters/main.go:48-75 registers 26 analyzers, including hardcodedfilepath.Analyzer (line 58) and timesleepnocontext.Analyzer (line 72).
pkg/linters/doc.go:3 reads // The actual analyzers are implemented in subpackages. All 24 active analyzers: and the bullet list below it has exactly 24 entries — neither hardcodedfilepath nor timesleepnocontext appears.
pkg/linters/spec_test.go:54-65 documents "25 analyzer subpackages" and documentedAnalyzers() (lines 66-94) returns 25 entries: it includes hardcodedfilepath (line 77) but omitstimesleepnocontext.
pkg/linters/README.md documents hardcodedfilepath (lines 18, 51, 85, 104, 128) but has notimesleepnocontext entry.
Impact
doc.go understates the analyzer set by 2, so the package godoc is wrong for two shipped linters.
timesleepnocontext is invisible to the README "Subpackages" table and is not covered by TestSpec_PublicAPI_SubpackageAnalyzers / TestSpec_UsageExample_AnalyzersUsable, so its Analyzer wiring is unverified by the spec suite even though it ships in the driver.
Recommendation
pkg/linters/doc.go: change All 24 active analyzers → All 26 active analyzers and add bullets for hardcodedfilepath and timesleepnocontext (alphabetical order), mirroring the existing one-line descriptions from each analyzer's Doc string.
pkg/linters/spec_test.go: bump the "25" comment to "26", add {"timesleepnocontext", timesleepnocontext.Analyzer} to documentedAnalyzers(), and add the import. Update the Spec comment list (lines 60-65).
pkg/linters/README.md: add timesleepnocontext to the Subpackages bullet list, the table, the usage-example block, and the import-list, matching how hardcodedfilepath was added.
Validation checklist
grep -c '^// - ' pkg/linters/doc.go returns 26 and the header says "All 26".
len(documentedAnalyzers()) == number of analyzers in cmd/linters/main.go (26).
go test ./pkg/linters/... passes (spec tests now cover both new linters).
Effort: Small — docs/test only, no analyzer logic change.
The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists. (Request id: 1D00:17F9F7:CCB8A:2EDAC7:6A2CE625)
Activity
Copilot commentedon Jun 13, 2026
The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists. (Request id: 1D00:17F9F7:CCB8A:2EDAC7:6A2CE625)
github-actions commentedon Jun 13, 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! 🍪
github-actions commentedon Jun 19, 2026
This issue was automatically closed because it expired on 2026-06-19T05:28:01.449Z.