Skip to content

Releases: mk868/nullaudit

0.8.0

30 Nov 13:36
fefb03d

Choose a tag to compare

Significant changes

New Rule: prohibitNonJSpecifyAnnotations

Enforces JSpecify standard by blocking legacy nullness annotations (e.g. javax.annotation, org.jetbrains)

Usage:

<plugin>
  <groupId>eu.soft-pol.lib.nullaudit</groupId>
  <artifactId>nullaudit-maven-plugin</artifactId>
  <version>0.8.0</version>
  <configuration>
    <rules>
      <prohibitNonJSpecifyAnnotations/>
    </rules>
  </configuration>
</plugin>

What's Changed

  • Wildcard support added by @mk868 in #88
  • Prohibited annotations rule added by @mk868 in #90

Full Changelog: v0.7.0...v0.8.0

0.7.0

02 Aug 21:53
79f9f2e

Choose a tag to compare

What's Changed

Full Changelog: v0.6.0...v0.7.0

0.6.0

07 Jun 06:28

Choose a tag to compare

What's Changed

  • Skip run when tile packaging is set by @Tijs-2 in #31
  • Allow to enable rules as a property by @mk868 in #35

New Contributors

Full Changelog: v0.5.0...v0.6.0

0.5.0

23 Apr 17:38
88fe2a4

Choose a tag to compare

Changes:

  • Skip check/report goals to run when <packaging>pom</packaging> is set #21
  • A new configuration parameter <skipPomPackaging> has been added - this parameter is useful for Maven builds that don't require operations to be performed on aggregation projects. true by default
  • The multi-module example has been added

Usage

To use this plugin in your Maven project, add the following configuration to your pom.xml:

<plugin>
  <groupId>eu.soft-pol.lib.nullaudit</groupId>
  <artifactId>nullaudit-maven-plugin</artifactId>
  <version>0.5.0</version>
  <configuration>
    <rules>
      <!-- Optional: Use to require @NullMarked annotations on classes -->
      <requireNullMarked>
        <!-- Optional: file that contains a list of FQCNs to exclude -->
        <!-- <exclusionsFile>legacy-classes.txt</exclusionsFile> -->
      </requireNullMarked>
      <!-- Optional: Use to require specified nullness of fields/arguments/return types -->
      <requireSpecifiedNullness>
        <!-- <exclusionsFile>legacy-classes.txt</exclusionsFile> -->
      </requireSpecifiedNullness>
      <!-- Optional: Use this to validate applied JSpecify annotations -->
      <verifyJSpecifyAnnotations/>
    </rules>
    <!-- Optional: limit the number of issues displayed on the console -->
    <maxErrors>100</maxErrors>
  </configuration>
  <executions>
    <execution>
      <phase>compile</phase>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>

0.4.0

16 Apr 14:52
1ec547b

Choose a tag to compare

Changes:

  • Added maven plugin configuration thanks to <rules> tag - now you can define what checks should be run.
  • A new check rule has been added: requireNullMarked - to enforce @NullMarked annotation on classes.
  • Report file format has been changed.
  • The check rule verifyJSpecifyAnnotations has been modified to detect unexpected annotations on primitives.

Usage

To use this plugin in your Maven project, add the following configuration to your pom.xml:

<plugin>
  <groupId>eu.soft-pol.lib.nullaudit</groupId>
  <artifactId>nullaudit-maven-plugin</artifactId>
  <version>0.4.0</version>
  <configuration>
    <rules>
      <!-- Optional: Use to require @NullMarked annotations on classes -->
      <requireNullMarked>
        <!-- Optional: file that contains a list of FQCNs to exclude -->
        <!-- <exclusionsFile>legacy-classes.txt</exclusionsFile> -->
      </requireNullMarked>
      <!-- Optional: Use to require specified nullness of fields/arguments/return types -->
      <requireSpecifiedNullness>
        <!-- <exclusionsFile>legacy-classes.txt</exclusionsFile> -->
      </requireSpecifiedNullness>
      <!-- Optional: Use this to validate applied JSpecify annotations -->
      <verifyJSpecifyAnnotations/>
    </rules>
    <!-- Optional: limit the number of issues displayed on the console -->
    <maxErrors>100</maxErrors>
  </configuration>
  <executions>
    <execution>
      <phase>compile</phase>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>

0.3.0

04 Mar 18:49

Choose a tag to compare

Changes:

  • Detection of IRRELEVANT_ANNOTATION - @NullMarked and @NullUnmarked on the same element
  • coveragePercentage in the report rounded to the ##.# form

Usage

To use this plugin in your Maven project, add the following configuration to your pom.xml:

<plugin>
  <groupId>eu.soft-pol.lib.nullaudit</groupId>
  <artifactId>nullaudit-maven-plugin</artifactId>
  <version>0.3.0</version>
  <configuration>
    <!-- Limit the number of issues displayed on the console -->
    <maxErrors>100</maxErrors>
  </configuration>
  <executions>
    <execution>
      <phase>compile</phase>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>

0.2.0

18 Jan 12:03

Choose a tag to compare

Changes:

  • The check goal now includes a new configuration parameter, maxErrors, which limits the console output to a specified number of issues. This functionality is disabled by default.

Usage

To use this plugin in your Maven project, add the following configuration to your pom.xml:

<plugin>
  <groupId>eu.soft-pol.lib.nullaudit</groupId>
  <artifactId>nullaudit-maven-plugin</artifactId>
  <version>0.2.0</version>
  <configuration>
    <!-- Limit the number of issues displayed on the console -->
    <maxErrors>100</maxErrors>
  </configuration>
  <executions>
    <execution>
      <phase>compile</phase>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>

0.1.0

18 Jan 11:57

Choose a tag to compare

Release date: 2025-01-12

Initial Release of the project.
The Maven plugin offers two goals:

  • check - verifies that the entire project is annotated with JSpecify nullness annotations.
  • report - generates a JSON report highlighting areas with unspecified nullness.

Usage

To use this plugin in your Maven project, add the following configuration to your pom.xml:

<plugin>
  <groupId>eu.soft-pol.lib.nullaudit</groupId>
  <artifactId>nullaudit-maven-plugin</artifactId>
  <version>0.1.0</version>
  <executions>
    <execution>
      <phase>compile</phase>
      <goals>
        <goal>check</goal>
      </goals>
    </execution>
  </executions>
</plugin>