Skip to content

doc-sync: pkg/linters/doc.go says "29 active analyzers" but 30 are registered — list omits hardcodedfilepath and sprintferrdot #40436

Description

@github-actions

Summary

pkg/linters/doc.go:3 states “All 29 active analyzers,” but the driver registers 30 analyzers (cmd/linters/main.go:53-82). The doc’s bullet list is also missing two of the registered analyzers: hardcodedfilepath and sprintferrdot (the newest linter). This is the same doc-drift class previously fixed in #38787 and #38028 (both closed), recurring after a new linter landed.

Evidence

  • pkg/linters/doc.go:3// The actual analyzers are implemented in subpackages. All 29 active analyzers:
  • cmd/linters/main.go:53-82 — 30 *.Analyzer registrations
  • Registered but absent from the doc.go bullet list:
    • hardcodedfilepath (registered at cmd/linters/main.go:63)
    • sprintferrdot (registered at cmd/linters/main.go:75)

Impact

Low severity but user-facing: doc.go is the package-level reference for the linter suite. The count and list are the authoritative inventory; drift here misleads contributors about what is active and has historically tripped spec_test-style inventory checks.

Recommendation

  1. Update the header count to 30.
  2. Add bullets for hardcodedfilepath (flags hardcoded OS-specific file path separators / literals) and sprintferrdot (flags redundant .Error() calls on error args passed to fmt format functions) in alphabetical position.
  3. If an inventory/spec_test assertion exists, confirm it now passes against 30.

Validation checklist

  • doc.go header reads 30
  • Bullet list enumerates all 30 registered analyzers (adds hardcodedfilepath, sprintferrdot)
  • README / any analyzer-count assertions stay in sync

Effort: trivial (doc-only).

References: §27860925409

Generated by 🤖 Sergo - Serena Go Expert · 276.8 AIC · ⌖ 11.6 AIC · ⊞ 5.8K ·

  • expires on Jun 26, 2026, 9:14 PM UTC-08:00

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

cookieIssue Monster Loves Cookies!sergo

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions