Static analysis tools catch bugs and style problems before code runs. The Go toolchain already includes go vet, which reports suspicious constructs, and gofmt, which formats code. This category adds linters with stricter checks, runners that combine many linters, formatters, tools that check architecture rules, and viewers that help you understand Go's syntax trees.
golangci-lint is the standard way to run linters: it bundles dozens of analyzers, runs them in parallel with caching, and is configured through a single YAML file, which makes it easy to use in CI. staticcheck, by Dominik Honnef, is a widely respected set of checks for bugs, simplifications and deprecated APIs, and is also included in golangci-lint and gopls. revive is a configurable successor to the deprecated golint. errcheck finds ignored errors, go-critic adds opinionated checks, and unconvert removes needless type conversions. golines, which shortened long lines, is archived. go-cleanarch checks dependency rules between layers.
Run go vet and staticcheck at minimum. For teams, golangci-lint with a short, agreed set of linters gives consistent results locally and in CI; enabling every linter tends to create noise people learn to ignore. Add govulncheck from the Go team to report known vulnerabilities that your code actually calls.
A fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, has integrations with all major IDE and has dozens of linters included.
Static code analyzer for Go and other languages: complexity, coupling, cohesion and maintainability metrics, with HTML, JSON, Markdown and SARIF reports.
github.com/ast-metrics/ast-metricsGo 1.25+ 25 dependenciesv0.43.1updated 5d ago
Checkstyle is a style check tool like java checkstyle. This tool inspired by java checkstyle, golint. The style referred to some points in Go Code Review Comments.