Skip to content
Catch common Java mistakes as compile-time errors
Java
Branch: master
Clone or download

Latest commit

kluever and eaftan Add Thread.stop(Throwable) and java.sql.Time APIs to the DoNotCallChe…
…cker.

#badtime

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=316152032
Latest commit e3c90c8 Jun 12, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github ISSUE_TEMPLATE v2 Nov 13, 2018
.idea Check in google-java-format IntelliJ configuration Nov 14, 2018
annotation Update version to 2.4.1-SNAPSHOT May 30, 2020
annotations Update version to 2.4.1-SNAPSHOT May 30, 2020
check_api Add Thread.stop(Throwable) and java.sql.Time APIs to the DoNotCallChe… Jun 13, 2020
core Add Thread.stop(Throwable) and java.sql.Time APIs to the DoNotCallChe… Jun 13, 2020
docgen Update version to 2.4.1-SNAPSHOT May 30, 2020
docgen_processor Update version to 2.4.1-SNAPSHOT May 30, 2020
docs/bugpattern Add a note about why java.util.Date#equals is a bad idea Jun 13, 2020
examples Update examples for 2.4.0 release May 29, 2020
refaster Update version to 2.4.1-SNAPSHOT May 30, 2020
test_helpers Add a newInstance(Class<? extends BugChecker>, ...) overload to the r… Jun 9, 2020
type_annotations Update version to 2.4.1-SNAPSHOT May 30, 2020
util Depend on auto-value-annotations and auto-service-annotations May 13, 2020
.gitignore Remove redundant calls to `String.toString()` Jul 6, 2017
.travis.yml Add up to JDK 14 to CI May 27, 2020
AUTHORS Add String.split check, and make all existing code pass it Dec 21, 2017
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 Use https instead of http May 10, 2018
appveyor.yml Don't notify on appveyor build success Nov 16, 2016
pom.xml Update version to 2.4.1-SNAPSHOT May 30, 2020

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 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

You can’t perform that action at this time.