Skip to content

google/error-prone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1d13006 · Mar 20, 2025
Mar 19, 2025
Jan 25, 2022
Nov 15, 2024
Mar 20, 2025
Mar 17, 2025
Mar 20, 2025
Oct 16, 2024
Mar 8, 2024
Mar 19, 2025
Jan 12, 2021
Mar 8, 2024
Feb 27, 2025
Mar 17, 2025
Nov 15, 2024
Dec 11, 2020
Jan 25, 2022
Mar 10, 2023
Dec 18, 2014
Sep 15, 2011
Aug 14, 2023
May 10, 2018
Jun 19, 2020
Aug 15, 2024
Mar 17, 2025

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.add(i);
      s.remove(i - 1);
    }
    System.out.println(s.size());
  }
}
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);
              ^
    (see https://errorprone.info/bugpattern/CollectionIncompatibleType)
1 error

Getting Started

Our documentation is at errorprone.info.

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.

Links