Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
E

error-prone

> 编程语言
Open source

Catch common Java mistakes as compile-time errors

7.2K stars0 likes1 views
WebsiteGitHub

About

Catch common Java mistakes as compile-time errors

Error Prone

Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time.

java
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

  • Mailing lists
    • General discussion
    • Announcements
  • Javadoc
  • Pre-release snapshots are available from Sonatype's snapshot repository (https://central.sonatype.com/repository/maven-snapshots/)

Issues· 536 open

View all issuesOpen on GitHub
  • #6130

    MisformattedTestData suggested fix wraps long `// BUG: Diagnostic contains: ` lines

    Updated Sep 21, 2026
  • #6113

    Check MessageFormat patterns and arguments, including in methods that delegate to MessageFormat

    Updated Sep 18, 2026
  • #6116

    CompilationTestHelper reports only the first line that fails its expectation

    Updated Sep 15, 2026
  • #6106

    New check request: OutputStream subclasses that inherit the per-byte write(byte[], int, int)

    Updated Sep 13, 2026
  • #6103

    Unknown error that error prone told me to report

    Updated Sep 13, 2026
  • #4254

    NonApiType: signaling for use of non-API-types on private methods does not make sense

    Updated Sep 11, 2026
  • #6079

    Per-check timing spans cost a few percent of the compile, and nothing reads the timings

    Updated Sep 9, 2026
  • #4256

    Maven multi-line <arg> does not work on Windows when <fork>ed

    Updated Sep 4, 2026
  • #6086

    [feat.request] add comparative in README.md to error-prone alternatives

    Updated Sep 2, 2026
  • #4833

    ThreadSafe is not a valid checker name

    Updated Aug 31, 2026

> Tags

Javajavastatic-analysis

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 22, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言