[sergo] Sergo Report: New 19th-Linter Enforce Audit (fmterrorfnoverbs) - 2026-06-01 #36185
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Sergo - Serena Go Expert. A newer discussion is available at Discussion #36407. |
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.
-
🔬 Sergo Report: reverify-plus-new-fmterrorfnoverbs-19th-linter-enforce-audit
Date: 2026-06-01 · Run: R25 · Success Score: 9/10
Executive Summary
This run reverified last run's enforce candidate and discovered a brand-new linter. sg24a1 (
uncheckedtypeassertion) fully landed: the maintainer appended-uncheckedtypeassertiontocgo.yml:1040(now 10 enforced flags), and the two regressedpass.ResultOf[...]type-assertions were refactored to the safe two-value form. The audit → fix-to-zero → enforce pattern has now held 4 consecutive runs (R22→R25).The registry grew 18 → 19 linters: the new
fmterrorfnoverbsflagsfmt.Errorf("literal")with no%verbs (whereerrors.Newis idiomatic and cheaper). It is registered but unenforced. The headline finding is a build-constraint subtlety: a naive grep reports 16 violations, but only 2 are enforceable under CI's default linux build — the other 14 live in*_wasm.gofiles excluded by the implicitGOARCH=wasmfilename constraint. Critically, this linter has no//nolintescape hatch, so fix-to-zero is the only enforcement path. One issue was filed.🛠️ Serena Tools Update
activate_project(project load), plus Grep/Read for the LSP-adjacent symbol/pattern work (Serenafind_symbolremains slower than Grep for broad sweeps).fmterrorfnoverbsadded atcmd/linters/main.go:25,49.📊 Strategy Selection (50% cached / 50% new)
Cached Reuse (50%) — reverify the prior enforce candidate
reverify-plus-uncheckedtypeassertion-...(score 9).-uncheckedtypeassertionis flag Remove ai-inference, opencode, genaiscript agentic engines for now #10 atcgo.yml:1040;jsonmarshalignoredeerror.go:26andstrconvparseignorederror.go:34now useinsp, ok := ...; if !ok { return nil, fmt.Errorf(...) }.New Exploration (50%) — scan for a newly-registered linter
fmterrorfnoverbsis the new 19th linter. Audited it end-to-end: violation count, build-constraint visibility,//nolintsupport, and the precise fix per file.Combined Rationale
Reuse confirms the pipeline keeps delivering; exploration refills it. Together they sustain the enforce-landing flywheel without re-filing dismissed issues.
🔍 Analysis Execution
pkg/focus) · Linters registered: 19 (10 enforced, 9 unenforced)pkg/linters/fmterrorfnoverbs,cmd/linters/main.go,.github/workflows/cgo.yml:1040, and allfmt.Errorfno-verb call sites.Findings Summary
📋 Detailed Findings
Medium —
fmterrorfnoverbsregistered but unenforced (sg25a1, issue filed)New 19th linter, no
//nolintsupport. 16 grep hits; only 2 enforceable under host build:pkg/workflow/utc_offset.go:18and:24(no build tag;fmtretained viaSprintf).*_wasm.gofiles (console/*,parser/github_wasm.go,workflow/git_helpers_wasm.go,workflow/github_cli_wasm.go).Informational findings
uncheckedtypeassertionis flag Remove ai-inference, opencode, genaiscript agentic engines for now #10; both newest analyzers refactored to two-valueResultOf.*_wasm.gofilenames implyGOARCH=wasm— always partition grep hits by build tag before claiming "N enforceable." Recorded to memory.fmterrorfnoverbscheckslen(Args)==0thenArgs[0]but notlen(Args)==1;fmt.Errorf("msg", extra)(no verb, extra arg) would be flagged and anerrors.Newfix would silently dropextra. Rare and already-buggy input; noted as observation only.nolint.BuildLineIndexthat siblings have — possible R26+ follow-up.Errorfvariants exist.✅ Improvement Task Generated
Task — Enforce
fmterrorfnoverbs(Medium, Small effort): convertutc_offset.go(2 sites) toerrors.New; optionally convert the 14 wasm-stub sites for parity (swap"fmt"→"errors"import per file); then append-fmterrorfnoverbstocgo.yml:1040. Validate withmake golint-custom(host) andGOOS=js GOARCH=wasm go build ./....📈 Success Metrics
📊 Historical Context
🎯 Recommendations
utc_offset.go(2 lines) and enforce-fmterrorfnoverbs. Lowest-effort, highest-certainty win.GOARCH=wasmlint stays clean.//nolint(BuildLineIndex) support tofmterrorfnoverbsfor consistency with siblings.🔄 Next Run Preview
errormessageopt-in scoping or a scopedctxbackground(28-site) refactor proposal.Generated by Sergo — The Serena Go Expert · Run ID: 26736678212 · Strategy: reverify-plus-new-fmterrorfnoverbs-19th-linter-enforce-audit
Beta Was this translation helpful? Give feedback.
All reactions