whatisgithub

What is error-prone?

google/error-prone — explained in plain English

Analysis updated 2026-06-24

7,169JavaAudience · developerComplexity · 3/5Setup · moderate

In one sentence

A Google tool that catches common Java programming mistakes at compile time, before your code ever runs. It plugs into Maven, Gradle, Bazel, or Ant and reports bugs with plain explanations at the exact line.

Mindmap

mindmap
  root((Error Prone))
    What it does
      Catch bugs at compile
      Explain each error
      No separate step
    Build integrations
      Maven
      Gradle
      Bazel
      Ant
    Bug patterns
      Type mismatches
      API misuse
      Common Java mistakes
    From Google
      Open source
      External docs site
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

Add Error Prone to a Maven or Gradle build so every developer on the team automatically gets bug checks during normal compilation.

USE CASE 2

Catch type mismatches and API misuse bugs in Java code that the standard compiler would silently accept.

USE CASE 3

Enforce code quality rules across a large Java codebase without a separate static analysis step or scheduled scan.

What is it built with?

JavaBazelMavenGradleAnt

How does it compare?

google/error-pronecol-e/recafdidi/knowstreaming
Stars7,1697,1677,172
LanguageJavaJavaJava
Setup difficultymoderateeasyhard
Complexity3/53/54/5
Audiencedeveloperdeveloperops devops

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

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires modifying your existing Maven, Gradle, Bazel, or Ant build configuration to enable the Error Prone compiler plugin.

License is not stated in the README, check the repository's license file for full terms.

So what is it?

Error Prone is a tool from Google that checks Java code for common mistakes while it is being compiled, before the code ever runs. The idea is to catch bugs at the earliest possible moment rather than discovering them later during testing or in production. A typical example it catches: if you have a collection typed to hold Short values and you accidentally pass an int to the remove method, Java will not flag that as an error on its own, but Error Prone will. It reports the exact line and explains why it is wrong. There are dozens of patterns like this that experienced Java developers have learned to avoid, and Error Prone encodes that knowledge so every developer on a project benefits automatically. It integrates with the standard Java build tools: Bazel, Maven, Ant, and Gradle. Once configured, it runs as part of the normal compilation step, so there is no separate analysis phase to remember. The project's documentation and full list of patterns it detects are at errorprone.info. The README is short and points to that external site for most details.

Copy-paste prompts

Prompt 1
I want to add Error Prone to my Maven project. Show me the exact pom.xml configuration needed to enable it during compilation.
Prompt 2
Error Prone flagged a warning about a method call in my Java code. How do I look up what the check means and understand why it's flagged?
Prompt 3
I want to suppress a specific Error Prone warning on one line of code without disabling the whole check project-wide. How do I do that?
Prompt 4
How do I add Error Prone to a Gradle build so it runs automatically on every compile without a separate task?
Prompt 5
Can I write a custom Error Prone check for a bug pattern specific to my own codebase? Where do I start?

Frequently asked questions

What is error-prone?

A Google tool that catches common Java programming mistakes at compile time, before your code ever runs. It plugs into Maven, Gradle, Bazel, or Ant and reports bugs with plain explanations at the exact line.

What language is error-prone written in?

Mainly Java. The stack also includes Java, Bazel, Maven.

What license does error-prone use?

License is not stated in the README, check the repository's license file for full terms.

How hard is error-prone to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is error-prone for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.