revive lint-analyzes Go packages with TOML-driven rules, faster than golint defaults. It adds custom rules, formatters, and granular enablement per file or line.
Overview
revive wraps a rule engine that mirrors and extends legacy golint behavior while letting teams tune severity through configuration files. Developers enable or disable checks, set per-rule settings, and skip ranges or files without silencing entire packages.
Optional type checking trades speed for deeper analysis, and bundled formatters emit friendly, stylish, JSON, SARIF, or CI-friendly Unix output. Command-line flags control config paths, failure exit codes, and color detection overrides.
Installation paths include Homebrew, source builds, Docker images, and downloaded binaries. Editor integrations and GitHub Actions examples show how to run revive in pipelines, often alongside aggregators such as golangci-lint or MegaLinter.
Go teams adopt revive to standardize reviews, encode house style as data, and ship custom organizational rules through its extensibility APIs.
Key features
- TOML-configured lint rules
- Faster than golint baseline
- Custom rule and formatter hooks
- Per-file and line suppressions
- Multiple output formatters
- Optional type checking mode
- Docker and package installs
- CI and editor integrations
Use cases
- Go code review automation
- Enforcing team style guides
- Replacing golint checks
- Custom organizational rules
- Pipeline quality gates