whatisgithub

What is revive?

mgechev/revive — explained in plain English

Analysis updated 2026-07-03

5,509GoAudience · developerComplexity · 2/5Setup · easy

In one sentence

A fast, configurable Go code linter that catches style issues and risky patterns, serving as a drop-in replacement for the deprecated golint with per-rule control and plugin support.

Mindmap

mindmap
  root((revive))
    What it does
      Lint Go code
      Flag style issues
      Catch risky patterns
    Features
      6x faster than golint
      Per-rule config via TOML
      Custom plugin rules
      Multiple output formats
    Integrations
      VS Code
      GoLand
      GitHub Actions
      golangci-lint
    Install Options
      Homebrew
      Go install
      Docker image
      Prebuilt binary
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace the deprecated golint in a CI pipeline with revive to get faster, rule-configurable linting with zero config changes.

USE CASE 2

Add a custom revive rule that enforces your team's naming conventions across all Go packages.

USE CASE 3

Integrate revive with GitHub Actions to automatically flag code style issues on every pull request.

USE CASE 4

Suppress specific lint warnings for auto-generated files using comment directives without disabling the rule globally.

What is it built with?

GoTOML

How does it compare?

mgechev/revivegetarcaneapp/arcanekgateway-dev/kgateway
Stars5,5095,5095,509
LanguageGoGoGo
Setup difficultyeasymoderatehard
Complexity2/53/54/5
Audiencedeveloperops devopsops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Works with no config file as a direct golint replacement, TOML config is optional for customization.

No specific license terms were mentioned in the explanation.

So what is it?

Revive is a linter for Go code. A linter is a tool that reads source code and flags potential problems: style violations, risky patterns, unused variables, and other issues that a compiler might not catch but that can cause bugs or make code harder to read. Revive is designed as a faster, more configurable alternative to golint, which was the standard Go linter before it was deprecated. The main practical differences from golint are speed and flexibility. When type checking is turned off in the configuration, revive runs more than six times faster than golint. Unlike golint, you can enable or disable individual rules through a configuration file written in TOML format. You can also suppress specific rules for individual files or line ranges using comment directives in the code, which golint only allowed for auto-generated files. Revive supports multiple output formats for its warnings, including plain text, a stylized color display, JSON, and formats compatible with tools like Checkstyle and GitHub's SARIF standard. It integrates with VS Code, GoLand, Vim, and GitHub Actions. It can also be used as part of golangci-lint, which is a popular tool that bundles many Go linters together. Developers can extend revive by writing custom rules in Go and loading them as a plugin. The README includes a walkthrough of how to write a rule and how to use revive as a library rather than a standalone command. Installation options include Homebrew on Mac, the standard Go install command, a prebuilt binary from the releases page, or a Docker image. Configuration is optional: with no config file, revive behaves identically to golint, so switching over requires no immediate changes. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
I want to add revive to my Go project's GitHub Actions CI. Write a workflow step that installs revive and runs it on all packages, failing the build if any warnings are found.
Prompt 2
Help me write a TOML config file for revive that disables the exported-comments rule and sets max function length to 60 lines.
Prompt 3
Show me how to write a custom revive rule plugin in Go that flags any variable named 'data' as too generic and suggests a more descriptive name.
Prompt 4
I'm migrating from golint to revive. What's the minimal setup to make revive behave exactly like golint so I can switch without breaking anything?
Prompt 5
Using revive as a library in Go, write a small program that lints a list of .go files and prints warnings grouped by rule name.

Frequently asked questions

What is revive?

A fast, configurable Go code linter that catches style issues and risky patterns, serving as a drop-in replacement for the deprecated golint with per-rule control and plugin support.

What language is revive written in?

Mainly Go. The stack also includes Go, TOML.

What license does revive use?

No specific license terms were mentioned in the explanation.

How hard is revive to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is revive for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.