Go lint (golangci-lint) — (errcheck) / (govet) / (staticcheck)
Log signatures
main.go:12:6: Error return value is not checked (errcheck) app.go:8:2: this value of err is never used (ineffassign) util.go:30:1: exported function should have comment (revive) (staticcheck) (govet)
What’s happening
golangci-lint aggregates many linters; each finding ends with the source linter in parentheses — file.go:12:6: ... (errcheck) — and that suffix is your triage key. The ones that are nearly always real bugs: (errcheck) — an ignored error return (the canonical Go landmine); (govet) — suspicious constructs like misformatted struct tags or copied locks; (staticcheck) correctness checks. The ones that are style: (gofmt), (revive), (gosimple). (ineffassign) and (unused) sit in between — often refactor residue, occasionally a sign that logic got disconnected.
Fix playbook
- 1Reproduce at CI's golangci-lint version — finding sets change a lot between releases; a version mismatch means you're fixing a different report.
- 2Sort findings by linter. Fix errcheck/govet/staticcheck as bugs: handle the error, don't _ = it away unless ignoring is genuinely correct (then say why in a comment).
- 3gofmt findings: just run gofmt -w / golangci-lint run --fix.
- 4False positives: //nolint:lintername // reason at the line — the reason is mandatory in spirit; a bare nolint is a future "why is this here."
- 5Rerun golangci-lint run ./... locally before pushing.
Prevention
- Pin the golangci-lint version in CI (and in the project Makefile so local matches), upgrade it deliberately.
Triage every red build, not just this one.
This page is one of 31 failure classes the open-source patchrail CLI matches from a raw log — locally, with secrets redacted first. If a log stumps it, open an issue; if it saves you a debugging morning, a star helps other maintainers find it.
pipx install patchrail