Catch common Java mistakes as compile-time errors
Java Other
Latest commit 867a5f3 Feb 25, 2017 @cushon cushon committed with cushon Disable UnnecessaryDefaultInEnumSwitch
RELNOTES: Disable UnnecessaryDefaultInEnumSwitch

MOE_MIGRATED_REVID=148527961
Permalink
Failed to load latest commit information.
.idea Add google intellij style. May 14, 2015
annotation [maven-release-plugin] prepare for next development iteration Feb 16, 2017
annotations Initial implementation of @DoNotCall annotation, and enforcement Feb 18, 2017
ant [maven-release-plugin] prepare for next development iteration Feb 16, 2017
check_api Fix handling of labelled break/continue targets in reachability Feb 24, 2017
core Disable UnnecessaryDefaultInEnumSwitch Feb 25, 2017
docgen Update pattern index to use correct template. Feb 18, 2017
docgen_processor [maven-release-plugin] prepare for next development iteration Feb 16, 2017
docs/bugpattern Clarify MutableConstantField docs Feb 25, 2017
examples Bump version numbers for 2.0.17 release Feb 16, 2017
refaster [maven-release-plugin] prepare for next development iteration Feb 16, 2017
test_helpers [maven-release-plugin] prepare for next development iteration Feb 16, 2017
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 [maven-release-plugin] prepare for next development iteration Feb 16, 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