Skip to content

Commit

Permalink
Added support for SpotBugs' noClassOk option
Browse files Browse the repository at this point in the history
  • Loading branch information
gtoison committed Dec 15, 2023
1 parent 4e05c0e commit 64f9499
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/groovy/org/codehaus/mojo/spotbugs/SpotBugsMojo.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
@Parameter(defaultValue = "false", property = "spotbugs.xmlOutput", required = true)
boolean xmlOutput

/**
* Output empty warning file if no classes are specified.
*
* @since 4.8.3.0
*/
@Parameter(defaultValue = "false", property = "spotbugs.noClassOk", required = true)
boolean noClassOk

/**
* Turn on and off HTML output of the Spotbugs report.
*
Expand Down Expand Up @@ -1026,6 +1034,10 @@ class SpotBugsMojo extends AbstractMavenReport implements SpotBugsPluginsTrait {
args << testClassFilesDirectory.absolutePath
}

if (noClassOk) {
args << "-noClassOk"
}

return args
}

Expand Down

0 comments on commit 64f9499

Please sign in to comment.