revive – linter for Go

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 if initialisers.

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
reviveDesigned as a drop-in replacement for golint
golangci-lintFast Go linters runner
gosecSecurity scanner for Go projects
StaticcheckAdvanced Go linter
go-criticOpinionated Go source code linter
VetExamines Go source code and reports suspicious constructs
gofumptStricter gofmt
gofmtFormats Go programs
goconstFind repeated Go literals that could be replaced with constants
go-ruleguardAnalysis-based Go linter that runs dynamically loaded rules
sloglintEnforce consistent structured logging conventions in Go
forbidigoGo linter for forbidding identifiers
godotKeep source code comments consistent
Godoc-LintEnforce consistent documentation comments in Go code
exhaustiveCheck Go switch statements for missing enum cases

Read our verdict in the software roundup.


Best Free and Open Source Software 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.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted