LinthelmIntroductions to linters, static analysis and code-quality tools

Static analysis

What is Error Prone? An introduction to Google's static analysis tool for Java

By the Linthelm editorial team · Published · Updated

Error Prone is a Google-developed, open-source static analysis tool for Java. It augments the compiler's type analysis so that more mistakes are caught at build time, before they become production bugs. It runs as part of the standard build and reports problems as compilation errors.

Tool
Error Prone
Made by
Google
Official site
errorprone.info
Category
Static analysis

Who makes Error Prone

Error Prone is developed by Google. Google uses it in its own Java build system and has released it as open source, so the same tool is available to teams outside the company.

The official website, linked below, is the place to find the project's documentation and the list of bug patterns it checks.

Official website: errorprone.info

What Error Prone is for

The Java compiler does little beyond static type checking. That leaves a gap: code can satisfy the type checker and still contain mistakes. Error Prone addresses that gap by augmenting the compiler's type analysis to catch more of these mistakes before they reach production.

It is also aimed at a subtler problem. Even seemingly safe refactorings can leave behind code that never does what was intended. Error Prone helps catch this kind of leftover defect, which a compiler focused only on types would not flag.

Who Error Prone is for

The vendor does not state a specific audience. Based on the verified facts, Error Prone is relevant to teams that write Java and want mistakes caught during compilation rather than in production.

Because it hooks into the standard build, it suits teams that want every developer to run the same checks without extra steps. Google's own use in its Java build system is an example of that model.

Notable capabilities

Error Prone's design centers on running inside the build and giving developers precise, actionable feedback. The capabilities below describe how it does that.

  • Augmented type analysis: it extends the compiler's static type checking to catch mistakes the compiler alone does not report.
  • Build integration: it hooks into the standard build, so all developers run it automatically without a separate step.
  • Immediate feedback: it reports mistakes right after they are made, which keeps the cause and the fix close together.
  • Suggested fixes: it produces suggested fixes, which means tooling can be built on top of it.
  • Findings as compilation errors: results surface as errors in the build, for example in a Bazel Java compilation.
  • Named bug patterns: each finding carries a named pattern, such as CollectionIncompatibleType, along with a descriptive message.
  • Refactoring safety: it helps catch code left behind by seemingly safe refactorings that never does what was intended.

How Error Prone fits static analysis

Within static analysis, Error Prone works at the compiler level for Java. Rather than running as a separate pass after the build, it extends the compiler's own type analysis, so its findings appear where developers already look: the build output.

For Linthelm's wider niche of linters, static analysis and code quality tools, this makes Error Prone a useful reference point for compiler-integrated checking. It focuses on catching mistakes with named, described bug patterns and on supplying suggested fixes, rather than on broader style or formatting concerns.

Frequently asked questions

What is Error Prone used for?

Error Prone is used to catch mistakes in Java code at build time. It augments the compiler's type analysis so that more problems are found before they become production bugs.

Who develops Error Prone?

Google develops Error Prone. Google uses it in its Java build system and has open-sourced it.

How do Error Prone findings appear?

Findings surface as compilation errors in the build, for example in a Bazel Java compilation. Each one carries a named bug pattern, such as CollectionIncompatibleType, with a descriptive message.

Does Error Prone suggest fixes?

Yes. Error Prone produces suggested fixes, so tooling can be built on top of it.

Do developers need to run Error Prone manually?

No. It hooks into the standard build so that all developers run it automatically, and it reports mistakes immediately after they are made.

Sources. This introduction is based on the vendor's official pages, checked on 21 November 2026 (Asia/Dhaka):

Linthelm is independent and is not affiliated with Google. Product names belong to their owners. Features change; confirm details on the official website.