awesome-java-errorprone-checkers-and-plugins
List of Errorprone Checkers and Plugins
The Fastest Way to Succeed is to Fail Faster
Google Errorprone is a plugin for the Javac compiler that identifies code that may produce bugs and will fail the build, catching potentially buggy code as early as possible in the development cycle. There are also additional checkers and Refaster libraries that others have written that can be used along with Errorprone. This is a list of the Errorprone checkers and Refaster plugins that can be used with Errorprone to help make your code better.
If you have identified new checkers that have clear usage instructions, please raise a Pull Request and I will happily approve it.
Errorprone Checkers
Will fail the build if any potentially buggy code is identified
- AutoDispose - Automatic binding+disposal of RxJava streams.
- Configurable CheckReturnValue
- Error Prone SLF4J - An Error Prone plugin for SLF4J
- GRPC Java API Checker - An Error Prone plugin that checks for usages of grpc-java experimental or internal APIs.
- Guava Cleanser - Fail the build on Guava usage
- Hyperledger Errorprone Checks
- Nope'n Checker - An error-prone checker which requires that classes be final, abstract or annotated with @Open.
- NullAway - A tool to help eliminate NullPointerExceptions (NPEs) in your Java code with low build-time overhead
- Piranha - A tool for refactoring code related to feature flag APIs
- Rx-Error-Prone - Error prone checks for RxJava
Refaster Extensions
Will modify the codebase to remove potentially buggy code as part of the build
- AssertJ Automation - Automatic code rewriting for AssertJ using error-prone and refaster
- Baseline Refaster Testing - A set of Gradle plugins that configure default code quality tools for developers.
- Digitalascent ErrorProne Flogger - Error prone checks & refactorings supporting Google Flogger
Methodology: Usages of the following dependencies that have valid Github repositories were identified and listed above.
Lombok + Errorprone use Public Service Announcement
If you are using both Errorprone and Lombok in your project, you will need to specify the Lombok annotation processor path in the compiler plugin. For Maven, the following configuration will need to be used for the maven-compiler-plugin For example:
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${mvn.compiler.source}</source>
<target>${mvn.compiler.target}</target>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${errorprone.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
...
</plugins>