Clone this repo:
  1. 2fd4656 Check compile-time constant field initializers by default by Liam Miller-Cushon · 3 days ago master
  2. ad3909b Automated rollback of commit cd7fb430ea9cc56f04a91854753e5bee024241ac. by Alan Malloy · 3 days ago
  3. 0d15a06 StreamToIterable: Ignore uses within enhanced for-loops. by ghm · 4 days ago
  4. 17bd96d Make ParameterComment checker more discerning about identifying comments by Alan Malloy · 4 days ago
  5. 12401cf Use JDK 11 instead of 8 for generating docs and snapshots by Liam Miller-Cushon · 4 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.