Clone this repo:
  1. 98dfcaf Scan try-with-resources blocks by Liam Miller-Cushon · 33 hours ago master
  2. be243a1 ImmutableChecker: check any variables that anonymous classes close around. by ghm · 2 days ago
  3. 2cb3b54 ImmutableChecker: fix the heuristic around MemberSelects. by ghm · 3 days ago
  4. 97a7dbc Don't crash when someone declares a StringBuffer using `var`. by Alan Malloy · 3 days ago
  5. 9ff2d42 Don't try to convert recursive lambdas to methods by Alan Malloy · 3 days ago

Error Prone

Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time.

public class ShortSet {
  public static void main (String[] args) {
    Set<Short> s = new HashSet<>();
    for (short i = 0; i < 100; i++) {
      s.remove(i - 1);
error: [CollectionIncompatibleType] Argument 'i - 1' should not be passed to this method;
its type int is not compatible with its collection's type argument Short
      s.remove(i - 1);
1 error

Getting Started

Our documentation is at

Error Prone works with Bazel, Maven, Ant, and Gradle. See our installation instructions for details.

Developing Error Prone

Developing and building Error Prone is documented on the wiki.