Skip to content

Commit

Permalink
Add Error Prone configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Aug 25, 2024
1 parent 25d4975 commit 59f94e2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
2 changes: 1 addition & 1 deletion jmh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@

<build-helper-maven-plugin.version>3.5.0</build-helper-maven-plugin.version>
<checkstyle.version>10.17.0</checkstyle.version>
<error-prone.version>2.30.0</error-prone.version>
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<maven-checkstyle-plugin.version>3.5.0</maven-checkstyle-plugin.version>
<maven-clean-plugin.version>3.4.0</maven-clean-plugin.version>
Expand Down Expand Up @@ -494,6 +495,19 @@
<configuration>
<release>${maven.compiler.release}</release>
<parameters>true</parameters>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne \
-XepDisableAllChecks \
-XepExcludedPaths:.*/target/generated-(|test-)sources/.*</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${error-prone.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>

Expand Down Expand Up @@ -615,6 +629,16 @@
</properties>
<build>
<defaultGoal>clean install</defaultGoal>
<plugins>
<!-- disable Error Prone -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs combine.self="override"/>
</configuration>
</plugin>
</plugins>
</build>
</profile>

Expand Down

0 comments on commit 59f94e2

Please sign in to comment.