aboutsummaryrefslogtreecommitdiff
path: root/jgvariant-parent
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-03-01 13:43:50 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2022-03-01 13:43:50 +0100
commit9006e7087bcefaecaf4c80489cb8c9e7a796d583 (patch)
tree8edf503f5b0d54c18c8c2ec24abb2769dc8685a2 /jgvariant-parent
parent0ad6a55f3faa0ff8c42321edc6b27bbcc358b709 (diff)
Ensure nullness correctness using Checker Framework.
Change-Id: Ie5a7749194313664a206e44597091a62afca9bdb
Diffstat (limited to 'jgvariant-parent')
-rw-r--r--jgvariant-parent/pom.xml40
1 files changed, 39 insertions, 1 deletions
diff --git a/jgvariant-parent/pom.xml b/jgvariant-parent/pom.xml
index fe0c1ed..92b7e07 100644
--- a/jgvariant-parent/pom.xml
+++ b/jgvariant-parent/pom.xml
@@ -74,6 +74,7 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<jetbrains-annotations.version>22.0.0</jetbrains-annotations.version>
<junit-jupiter.version>5.8.2</junit-jupiter.version>
<xz.version>1.9</xz.version>
+ <checker-framework.version>3.21.1</checker-framework.version>
</properties>
<distributionManagement>
@@ -102,6 +103,18 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<version>${apiguardian.version}</version>
</dependency>
+ <!-- Static analysis -->
+ <dependency>
+ <groupId>org.checkerframework</groupId>
+ <artifactId>checker</artifactId>
+ <version>${checker-framework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.checkerframework</groupId>
+ <artifactId>checker-qual</artifactId>
+ <version>${checker-framework.version}</version>
+ </dependency>
+
<!-- OSTree compression support -->
<dependency>
<groupId>org.tukaani</groupId>
@@ -131,6 +144,22 @@ SPDX-License-Identifier: LGPL-3.0-or-later
</dependencies>
</dependencyManagement>
+ <dependencies>
+ <!-- Static analysis -->
+ <dependency>
+ <groupId>org.checkerframework</groupId>
+ <artifactId>checker</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.checkerframework</groupId>
+ <artifactId>checker-qual</artifactId>
+ <scope>provided</scope>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+
<build>
<pluginManagement>
@@ -166,8 +195,9 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<fork>true</fork>
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
- <arg>-Xplugin:ErrorProne</arg>
+ <arg>-Xplugin:ErrorProne -Xep:InvalidParam:OFF</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
@@ -184,7 +214,15 @@ SPDX-License-Identifier: LGPL-3.0-or-later
<artifactId>error_prone_core</artifactId>
<version>${errorprone.version}</version>
</path>
+ <path>
+ <groupId>org.checkerframework</groupId>
+ <artifactId>checker</artifactId>
+ <version>${checker-framework.version}</version>
+ </path>
</annotationProcessorPaths>
+ <annotationProcessors>
+ <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
+ </annotationProcessors>
</configuration>
</plugin>