Bazel Blog

Checking your Java errors with Error Prone.

We recently open-sourced our support for Error Prone. Error Prone checks for common mistakes in Java code that will not be caught by the compiler.

We turned Error Prone on by default but you can easily turn it off by using the Javac option --extra_checks:off. To do so, simply specify --javacopt='-extra_checks:off' to the list of Bazel's options. You can also tune the checks error-prone will perform by using the -Xep: flags.

See the documentation of Error Prone for more on Error Prone.