# mgechev/revive

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/mgechev-revive).**

5,524 stars · 315 forks · Go · MIT

## Links

- GitHub: https://github.com/mgechev/revive
- Homepage: https://revive.run
- awesome-repositories: https://awesome-repositories.com/repository/mgechev-revive.md

## Topics

`go` `golang` `golint` `hacktoberfest` `linter` `static-analysis` `static-code-analysis`

## Description

Revive is a configurable static analysis linter and code quality tool for Go. It analyzes source code to detect common coding mistakes, identify style violations, and enforce language standards without executing the program.

The project functions as both a command line tool and an embeddable analysis engine. This allows the core linting logic to be integrated as a library into other Go applications for programmatic code inspection.

The tool supports custom rule sets and severity levels managed through a structured configuration file. It provides capabilities for suppressing specific warnings via inline comments, excluding files from analysis, and extending the engine with custom analysis rules. Analysis results can be exported in multiple standardized formats for integration with external tools.

## Tags

### Testing & Quality Assurance

- [Code Quality Analyzers](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/code-quality-analyzers.md) — Analyzes Go source code against configurable rules to identify style violations and potential bugs. ([source](https://cdn.jsdelivr.net/gh/mgechev/revive@master/README.md))
- [Static Code Analysis Tools](https://awesome-repositories.com/f/testing-quality-assurance/code-quality-review/code-quality-tools/static-code-analysis-tools.md) — Implements a static analysis engine that scans Go source code for bugs and style violations without execution.
- [Static Analysis AST Parsing](https://awesome-repositories.com/f/testing-quality-assurance/static-code-analysis/ast-extraction/static-analysis-ast-parsing.md) — Utilizes abstract syntax tree parsing to inspect Go source code structure and detect coding errors.
- [Quality Gates](https://awesome-repositories.com/f/testing-quality-assurance/ci-integration-testing/quality-gates.md) — Can be integrated into CI/CD pipelines as a quality gate to prevent non-compliant code merges.

### Development Tools & Productivity

- [Analysis Integration APIs](https://awesome-repositories.com/f/development-tools-productivity/analysis-integration-apis.md) — Provides programmatic APIs to invoke the analysis engine directly within other Go applications. ([source](https://revive.run/docs))
- [Advanced Code Inspection](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/advanced-code-inspection.md) — Exposes the core linting engine as a library for programmatic code analysis within other Go applications.
- [Custom Lint Rule Plugins](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-analysis-rules/framework-linting-rules/core-rule-extensions/custom-lint-rule-plugins.md) — Provides a plugin interface for adding custom lint rules beyond the built-in set. ([source](https://cdn.jsdelivr.net/gh/mgechev/revive@master/README.md))
- [Custom Lint Rule Definitions](https://awesome-repositories.com/f/development-tools-productivity/code-quality-analysis/static-analysis-engines/static-analysis-tools/static-analysis-rules/framework-linting-rules/core-rule-extensions/custom-lint-rule-plugins/custom-lint-rule-definitions.md) — Creating and applying project-specific analysis logic to enforce unique architectural constraints or internal coding standards.
- [Programmatic Source Analysis](https://awesome-repositories.com/f/development-tools-productivity/programmatic-source-analysis.md) — Functions as an embeddable analysis engine providing an API for programmatic source code inspection.

### Programming Languages & Runtimes

- [Embeddable Analysis Engines](https://awesome-repositories.com/f/programming-languages-runtimes/embeddable-analysis-engines.md) — Integrate core logic directly into another application to perform programmatic code checks without using a command line interface. ([source](https://cdn.jsdelivr.net/gh/mgechev/revive@master/README.md))
- [Static Analysis Tools](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/programming-environments-tooling/go-environments/static-analysis-tools.md) — Acts as a static analysis tool that automates linting and code quality checks for Go projects.
- [Customizable Rule Sets](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/programming-environments-tooling/go-environments/static-analysis-tools/go-linter-aggregators/customizable-rule-sets.md) — Allows users to manage linting behaviors and severity levels through a structured external configuration file.
- [Linter Rule Extensions](https://awesome-repositories.com/f/programming-languages-runtimes/class-based-architecture/rule-logic-extensions/linter-rule-extensions.md) — Enables adding project-specific checks by implementing a rule interface and integrating it into the engine. ([source](https://revive.run/docs))

### Security & Cryptography

- [Go Source Code Analyzers](https://awesome-repositories.com/f/security-cryptography/source-code-vulnerability-scanning/go-source-code-analyzers.md) — Performs static analysis on Go source files to detect mistakes and enforce style standards. ([source](https://revive.run/docs))
- [Style Linters](https://awesome-repositories.com/f/security-cryptography/source-code-vulnerability-scanning/go-source-code-analyzers/style-linters.md) — Provides a set of configurable rules to enforce coding styles and idiomatic standards in Go source code.

### Software Engineering & Architecture

- [Go Quality Validators](https://awesome-repositories.com/f/software-engineering-architecture/automated-code-quality-tools/go-quality-validators.md) — Provides automated validation of Go-specific formatting and linting to maintain high code quality standards.
- [Embeddable Analysis Engines](https://awesome-repositories.com/f/software-engineering-architecture/embeddable-analysis-engines.md) — Exposes the core linting logic as a library that can be imported and executed within other Go applications.
- [Linting Rule Configurations](https://awesome-repositories.com/f/software-engineering-architecture/project-management-governance/project-governance/standards-rule-enforcement/configuration-driven-rules/linting-rule-configurations.md) — Determines which analysis rules to execute and their severity via a structured external configuration file.
- [Rule Interfaces](https://awesome-repositories.com/f/software-engineering-architecture/static-analysis-rule-engines/import-lint-rule-engines/general-lint-rule-engines/rule-interfaces.md) — Defines a standard interface that each linting rule must implement for integration into the analysis engine.
- [Warning Suppressions](https://awesome-repositories.com/f/software-engineering-architecture/warning-issuance-systems/warning-suppressions.md) — Implements mechanisms to ignore specific linting rules on individual lines of code. ([source](https://revive.run/docs))
- [Rule Suppression Comments](https://awesome-repositories.com/f/software-engineering-architecture/warning-issuance-systems/warning-suppressions/suppression-comment-governors/rule-suppression-comments.md) — Supports inline source code comments to disable specific linting rules for targeted lines or blocks.

### Part of an Awesome List

- [Code Analysis and Linting](https://awesome-repositories.com/f/awesome-lists/devtools/code-analysis-and-linting.md) — Fast, configurable, and extensible linter.
- [Code Analysis and Quality](https://awesome-repositories.com/f/awesome-lists/devtools/code-analysis-and-quality.md) — Fast and configurable code linter.
- [Static Analysis and Linting](https://awesome-repositories.com/f/awesome-lists/devtools/static-analysis-and-linting.md) — Fast, configurable linter for identifying style and performance issues.
