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 · ◷
Description
The
logfatallibrarycustom analyzer (recently added tocmd/linters/main.go) is a strict subset of the already CI-enforcedrawloginlibanalyzer.rawloginlib.rawLogFuncsalready coversFatal/Fatalf/Fatalln(seerawloginlib.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
//nolintcomments if ever silenced.Additionally,
doc.goheader still says "44 active analyzers" while 48 are registered — a comment drift issue.Suggested Changes
logfatallibraryfromcmd/linters/main.go(or mark it deprecated and defer torawloginlib)doc.goheader count to match the actual registered analyzer countmake golint-customstill passes cleanly after removalFiles Affected
cmd/linters/main.go(removelogfatallibraryregistration)cmd/linters/logfatallibrary/(directory — remove if linter is unused)doc.go(update analyzer count in header comment)Success Criteria
make golint-custompasses with no regressionslog.Fatal*findings when both linters were activedoc.goheader count matches actual registered analyzer countSource
Extracted from Sergo Report DELTA-43to48 #45380
Priority
Medium — Reduces linter noise and maintainability overhead