Add Error Prone to a Maven or Gradle build so every developer on the team automatically gets bug checks during normal compilation.
Catch type mismatches and API misuse bugs in Java code that the standard compiler would silently accept.
Enforce code quality rules across a large Java codebase without a separate static analysis step or scheduled scan.
Requires modifying your existing Maven, Gradle, Bazel, or Ant build configuration to enable the Error Prone compiler plugin.
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.
← google on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.