maven-compiler-pluginchecker-framework

Excluding NullnessChecker by directory (not package)


I am including the Checker Framework's Nullness checker in our existing Java project built with Maven. I configured the maven-compiler-plugin, Nullness Checking seems to work fine so far.

I would like to exclude warnings from our generated code.

Looking at the manual, I found the -skipDefs command-line-argument. According to the manual the distinction there is made by the fully qualified name of the class. However, our generated classes use the same package structure and names as the remaining code.

Question: Is it possible to exclude generated classes by their directory? e.g. target\generated-sources... Since the Warnings include the directory, I hope there is a way to do this.

Best, Patrick


Solution

  • This is not currently implemented.

    As you point out, it would not be too hard to do.

    Could you please open an enhancement request at https://github.com/typetools/checker-framework/issues?