|
41 | 41 | <junit.version>5.6.2</junit.version>
|
42 | 42 | <jmh.version>1.21</jmh.version>
|
43 | 43 | <versions-plugin.version>2.7</versions-plugin.version>
|
| 44 | + <errorprone.version>2.6.0</errorprone.version> |
44 | 45 | <maven.javadoc.skip>true</maven.javadoc.skip>
|
45 | 46 | <maven.source.skip>true</maven.source.skip>
|
46 | 47 | <gpg.skip>true</gpg.skip>
|
|
174 | 175 | <maven.compiler.release>11</maven.compiler.release>
|
175 | 176 | </properties>
|
176 | 177 | </profile>
|
| 178 | + |
| 179 | + <!-- |
| 180 | + Profile that enables lint checks on compilation |
| 181 | + Uses Google Error Prone for more coverage |
| 182 | + --> |
| 183 | + <profile> |
| 184 | + <id>lint</id> |
| 185 | + <activation> |
| 186 | + <!-- activate lint checks only on JDK1.9+ (required by Error Prone) --> |
| 187 | + <jdk>(1.9,)</jdk> |
| 188 | + <!-- custom property to disable link checks on command line (enabled by default) --> |
| 189 | + <property> |
| 190 | + <name>!lint.skip</name> |
| 191 | + <value>!true</value> |
| 192 | + </property> |
| 193 | + </activation> |
| 194 | + <build> |
| 195 | + <plugins> |
| 196 | + <plugin> |
| 197 | + <groupId>org.apache.maven.plugins</groupId> |
| 198 | + <artifactId>maven-compiler-plugin</artifactId> |
| 199 | + <version>3.8.0</version> |
| 200 | + <configuration> |
| 201 | + <showWarnings>true</showWarnings> |
| 202 | + <fork>true</fork> <!-- Required for JDK16+ --> |
| 203 | + <compilerArgs combine.children="append"> |
| 204 | + <!--arg>-Werror</arg--> <!-- Disabled (temporarily?) --> |
| 205 | + <arg>-Xlint:all</arg> |
| 206 | + <arg>-XDcompilePolicy=simple</arg> |
| 207 | + <arg>-Xplugin:ErrorProne</arg> |
| 208 | + <!-- Following are required on JDK16+ --> |
| 209 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg> |
| 210 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg> |
| 211 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg> |
| 212 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg> |
| 213 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg> |
| 214 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg> |
| 215 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg> |
| 216 | + <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg> |
| 217 | + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg> |
| 218 | + <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg> |
| 219 | + </compilerArgs> |
| 220 | + <annotationProcessorPaths combine.children="append"> |
| 221 | + <path> |
| 222 | + <groupId>com.google.errorprone</groupId> |
| 223 | + <artifactId>error_prone_core</artifactId> |
| 224 | + <version>${errorprone.version}</version> |
| 225 | + </path> |
| 226 | + </annotationProcessorPaths> |
| 227 | + </configuration> |
| 228 | + </plugin> |
| 229 | + </plugins> |
| 230 | + </build> |
| 231 | + </profile> |
177 | 232 | </profiles>
|
178 | 233 |
|
179 | 234 | <!-- http://central.sonatype.org/pages/requirements.html#developer-information -->
|
|
0 commit comments