Skip to content

[Code Quality] Remove redundant logfatallibrary analyzer — strict subset of enforced rawloginlib #45404

Description

@github-actions

Description

The logfatallibrary custom analyzer (recently added to cmd/linters/main.go) is a strict subset of the already CI-enforced rawloginlib analyzer. rawloginlib.rawLogFuncs already covers Fatal/Fatalf/Fatalln (see rawloginlib.go:26-30) and is enforced in CI (cgo.yml:1208,:1211).

Keeping both results in zero added detection coverage, double-reporting findings, and requiring dual //nolint comments if ever silenced.

Additionally, doc.go header still says "44 active analyzers" while 48 are registered — a comment drift issue.

Suggested Changes

  • Remove logfatallibrary from cmd/linters/main.go (or mark it deprecated and defer to rawloginlib)
  • Update doc.go header count to match the actual registered analyzer count
  • Verify make golint-custom still passes cleanly after removal

Files Affected

  • cmd/linters/main.go (remove logfatallibrary registration)
  • cmd/linters/logfatallibrary/ (directory — remove if linter is unused)
  • doc.go (update analyzer count in header comment)

Success Criteria

  • make golint-custom passes with no regressions
  • No duplicate log.Fatal* findings when both linters were active
  • doc.go header count matches actual registered analyzer count

Source

Extracted from Sergo Report DELTA-43to48 #45380

Priority

Medium — Reduces linter noise and maintainability overhead

🔍 Task mining by Discussion Task Miner - Code Quality Improvement Agent · 205.3 AIC · ⌖ 5.26 AIC · ⊞ 7K ·

  • expires on Jul 14, 2026, 11:37 PM UTC-08:00

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions