Catch common Java mistakes as compile-time errors
Java Other
Latest commit 3974a3c Jan 20, 2017 @cushon cushon committed with cushon Handle returns inside lambdas in Finally
MOE_MIGRATED_REVID=145028101
Permalink
Failed to load latest commit information.
.idea Add google intellij style. May 14, 2015
annotation Add a new Error Prone checker for chaining calls from Message -> Byte… Jan 7, 2017
annotations Created the MustBeClosedChecker to ensure that constructors or methods Dec 7, 2016
ant [maven-release-plugin] prepare for next development iteration Dec 2, 2016
check_api Delete unused and misguided findSuperMethod Jan 18, 2017
core Handle returns inside lambdas in Finally Jan 20, 2017
docgen Initial version of an open source refaster, with an example in the RE… Dec 22, 2016
docgen_processor Initial version of an open source refaster, with an example in the RE… Dec 22, 2016
docs/bugpattern Add a warning for Set/HashSet of URL Jan 20, 2017
examples Initial version of an open source refaster, with an example in the RE… Dec 22, 2016
refaster Unshade dependencies in error_prone_core Jan 10, 2017
test_helpers Initial version of an open source refaster, with an example in the RE… Dec 22, 2016
third_party/java/auto Initial bazel build Apr 18, 2015
util Update generate-latest-docs.sh after changes to the docs source location Oct 3, 2016
.gitignore Clean up Bazel plugin example (#421) Jun 24, 2016
.travis.yml Fix travis config, again Sep 21, 2016
CONTRIBUTING.md Add CONTRIBUTING file Dec 18, 2014
COPYING Initial commit. Basic Predicate DSL for matchers, and check for one e… Sep 15, 2011
README.md Revise README Feb 11, 2016
WORKSPACE Initial bazel build Apr 18, 2015
appveyor.yml Don't notify on appveyor build success Nov 16, 2016
pom.xml Update maven-project-info-reports-plugin version. Jan 10, 2017

README.md

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 http://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