Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Google Error Prone static code analysis tool
- for more info see https://errorprone.info/ - add a separate maven profile for running errorprone analysis it is not active by default - Add top-level lombok.config file for configuring Lombok. This file doesn't contain any other settings that marks it as the top most config file with "config.stopBubbling = true" (see https://projectlombok.org/features/configuration for reference) - Before running the Error Prone analysis, it's necessary to manually configure Lombok to add @javax.annotation.Generated("lombok") annotation on all fields, methods, and types that are generated. This makes Error Prone skip the analysis for Lombok generated code. - this setting cannot be enabled by default since JDK9+ doesn't include the javax.annotation.Generated annotation by default and adding the required dependency will change the classpath dependency resolution results. - There is an open issue to support lombok.Generated annotion in ErrorProne, google/error-prone#1863 - example usage: Configure Lombok to add Generated annotations echo "lombok.addJavaxGeneratedAnnotation = true" >> lombok.config then, on JDK8 "mvn -Perrorprone,errorprone-jdk8,core-modules compile" on JDK11+ "mvn -Perrorprone,errorprone-jdk11,core-modules compile" - usability is better when used together with IntelliJ since one can click on the error message to navigate to the code location - also add configuration for Error Prone SLF4J plugin https://github.com/KengoTODA/errorprone-slf4j which helps detect misusage of SLF4J API
- Loading branch information