revive is a fast and configurable static analysis framework for Go. It was designed as a drop-in replacement for golint while offering considerably greater control over the checks that are performed.
Projects can configure rules individually with TOML, control severity and confidence levels and suppress selected diagnostics directly in source code.
revive also provides an extensible linting framework, allowing projects to implement their own rules or use the analysis engine as a Go library.
This is free and open source software.
Key Features
- Provides a broad collection of rules covering correctness, naming, style and modern Go practices.
- TOML configuration allows individual rules to be enabled, disabled and configured.
- Supports rule-specific file exclusions using paths, glob patterns and regular expressions.
- Source directives can suppress the complete linter or individual rules for files and selected lines.
- Supports multiple output formats including text, JSON, Checkstyle and SARIF.
- Allows warning and error severities, confidence thresholds and return codes to be customised.
- Can be extended with custom rules and used as a reusable linting library.
- Integrates with editors, GitHub Actions and golangci-lint.
- Recent rules cover areas including package naming, slice operations, marshal receivers and multiline
ifinitialisers.
Website: github.com/mgechev/revive
Support:
Developer: Minko Gechev and contributors
License: MIT License
revive is written in Go. Learn Go with our recommended free books and free tutorials.
Related Software
| Go Linters | |
|---|---|
| revive | Designed as a drop-in replacement for golint |
| golangci-lint | Fast Go linters runner |
| gosec | Security scanner for Go projects |
| Staticcheck | Advanced Go linter |
| go-critic | Opinionated Go source code linter |
| Vet | Examines Go source code and reports suspicious constructs |
| gofumpt | Stricter gofmt |
| gofmt | Formats Go programs |
| goconst | Find repeated Go literals that could be replaced with constants |
| go-ruleguard | Analysis-based Go linter that runs dynamically loaded rules |
| sloglint | Enforce consistent structured logging conventions in Go |
| forbidigo | Go linter for forbidding identifiers |
| godot | Keep source code comments consistent |
| Godoc-Lint | Enforce consistent documentation comments in Go code |
| exhaustive | Check Go switch statements for missing enum cases |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.