[sergo] Sergo Report: Registry-35 nolint+filecheck Parity Sweep - 2026-06-27 #41846
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Sergo - Serena Go Expert. A newer discussion is available at Discussion #42005. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Run R49 (49th Sergo run). Linter registry is stable at 35 analyzers (
grep -c Analyzer cmd/linters/main.go= 35; no 36th since R48). Serena LSP toolset unchanged at 23 tools. This run's new-exploration half was a fullinternal/nolint+internal/filechecksuppression/test-skip parity sweep across all 35 analyzers — a dimension never audited end-to-end before. The cached half reconciled the R46/R47 nolint-parity issues and found two of them have landed in code while their issues remain open.Key metrics
#41844,#41845)Tool & registry updates
No Serena tool changes (23 stable since R4). No new linter (35 stable since R48).
pkg/linters/doc.gostill reads "30 active analyzers" — the long-standing doc drift tracked by #40436 persists.Strategy split (50 / 50)
Cached component — reconcile + sibling-asymmetry probe. Re-checked the standing nolint-parity issues against current code. Found that #41377 (4 context-family linters) and #40734 (the two threshold linters) have already had
internal/nolintwired in —contextcancelnotdeferred,ctxbackground,execcommandwithoutcontext,timesleepnocontext,largefunc, andexcessivefuncparamsall now honour//nolint:. The issues are still open (landed-but-open), a recurring pattern for this team.New-exploration component — full parity matrix. Swept every analyzer for
internal/nolintandinternal/filecheckwiring and cross-checked type-resolution quality. This surfaced the remaining nolint-missing cluster and a coarse verb-presence check in a CI-enforced linter.Findings
1. nolint-suppression parity gap — 5 linters (→ #41844)
Five analyzers emit diagnostics but import no
internal/nolint:fileclosenotdeferred,ossetenvlibrary,sprintferrorsnew,sprintferrdot,lenstringzero. The strongest cases are sibling asymmetries:fileclosenotdeferred(no nolint) vs its near-twincontextcancelnotdeferred(nolint at :32/:63/:96).ossetenvlibrary(no nolint) vs its policy-twinosexitinlibrary(nolint at :37/:61).Several of these report judgment-call diagnostics (manual
Close()before a rename;os.Setenvin a support file) that are sometimes legitimately correct, so an unsuppressable report blocks valid code and prevents CI enforcement — the exact blocker that motivated the now-landed #41377/#40734. (ssljsonalso lacks nolint but is a spec-domain validator, excluded intentionally.)2. fmterrorfnoverbs — escaped %% false negative (→ #41845)
fmterrorfnoverbs.go:63decides verb-presence withstrings.Contains(val, "%")on the raw literal. An escaped literal percent%%contains%but is not a verb, sofmt.Errorf("90%% done")(no real verb) is wrongly skipped — a false negative in a CI-enforced linter. Fix: strip%%pairs before testing, reusing the%%-aware scan referenced by #40434 / #38788. The rest of the linter (IsFmtErrorftype-resolution, nolint) is correct.Audited-clean & duplicates skipped
strconvparseignorederror(type-resolvedPkgName.Path()=="strconv"+ nolint),sprintferrorsnew/ossetenvlibrarypackage-identity (type-resolved),fmterrorfnoverbsapart from the%%gap.fprintlnsprintf:144(ident.Name=="fmt"),osexitinlibrary:59,fileclosenotdeferred:172,contextcancelnotdeferred:138— all syntactic package-by-name matches already covered by Linter precision: migrate the 3 remaining CI-enforced linters that match stdlib packages by identifier name to astutil.IsPkgSele [Content truncated due to length] #40243 and Linter precision: two newest linters (fileclosenotdeferred, contextcancelnotdeferred) match stdlib packages by identifier name — [Content truncated due to length] #40435.strconvparseignorederrorandjsonmarshalignoredeerrorlackfilecheck.IsTestFile(lint test files), but both are CI-enforced with-test=false, mooting it in CI.Generated tasks
internal/nolintinto the 5-linter cluster (#41844) — mechanical, ~5–8 lines + one testdata case each, mirroring the landed nolint parity gap: 4 non-enforced context-family linters have no internal/nolint suppression (execcommandwithoutcontext, ctxback [Content truncated due to length] #41377 template. Effort: low.%%-aware verb scan infmterrorfnoverbs(#41845) — single-function change + testdata. Effort: low.Historical context
48 prior runs, 347 cumulative findings, 97 tasks, avg success 8.8. The nolint-parity theme has been productive: #aw_sg44a2 (threshold linters), #41377 (context family) — both now landed in code. R49 completes the sweep by enumerating the remaining gap.
Recommendations & next-run focus (R50)
grep -c Analyzervs 35 and the doc-omitted-minus-known heuristic.seenmapboolinternals (seenmapbool: duplicate diagnostics for set-maps declared inside function literals (double AST traversal) #40733 double-report),errstringmatchcoverage (errstringmatch coverage gap: only strings.Contains(err.Error(), ...) is flagged — HasPrefix/HasSuffix/EqualFold/Index on err.Err [Content truncated due to length] #40244),hardcodedfilepathrecheck.References:
Beta Was this translation helpful? Give feedback.
All reactions