Configuration options for the FindBugs plugin. All options have sensible defaults. See the FindBugs Manual for additional information on these options.
Below is a full configuration example. Since all properties have sensible defaults, typically only selected properties will be configured.
apply plugin: "java" apply plugin: "findbugs" findbugs { toolVersion = "2.0.1" sourceSets = [sourceSets.main] ignoreFailures = true reportsDir = file("$project.buildDir/findbugsReports") effort = "max" reportLevel = "high" visitors = ["FindSqlInjection", "SwitchFallthrough"] omitVisitors = ["FindNonShortCircuit"] includeFilter = file("$rootProject.projectDir/config/findbugs/includeFilter.xml") excludeFilter = file("$rootProject.projectDir/config/findbugs/excludeFilter.xml") excludeBugsFilter = file("$rootProject.projectDir/config/findbugs/excludeBugsFilter.xml") }
Type | Name and description |
---|---|
String |
effort The analysis effort level. |
TextResource |
excludeBugsFilterConfig A filter specifying baseline bugs to exclude from being reported. |
TextResource |
excludeFilterConfig A filter specifying bugs to exclude from being reported. |
TextResource |
includeFilterConfig A filter specifying which bugs are reported. |
Collection<String> |
omitVisitors Similar to visitors except that it specifies bug detectors which should not be run.
|
String |
reportLevel The priority threshold for reporting bugs. |
Collection<String> |
visitors The bug detectors which should be run. |
Constructor and description |
---|
FindBugsExtension
(Project project) |
Type | Name and description |
---|---|
File |
getExcludeBugsFilter() The filename of a filter specifying baseline bugs to exclude from being reported. |
File |
getExcludeFilter() The filename of a filter specifying bugs to exclude from being reported. |
File |
getIncludeFilter() The filename of a filter specifying which bugs are reported. |
void |
setExcludeBugsFilter(File filter) The filename of a filter specifying baseline bugs to exclude from being reported. |
void |
setExcludeFilter(File filter) The filename of a filter specifying bugs to exclude from being reported. |
void |
setIncludeFilter(File filter) The filename of a filter specifying which bugs are reported. |
The analysis effort level. The value specified should be one of min
, default
, or max
.
Higher levels increase precision and find more bugs at the expense of running time and memory consumption.
A filter specifying baseline bugs to exclude from being reported.
A filter specifying bugs to exclude from being reported. Replaces the excludeFilter
property.
A filter specifying which bugs are reported. Replaces the includeFilter
property.
Similar to visitors
except that it specifies bug detectors which should not be run.
By default, no visitors are omitted.
The priority threshold for reporting bugs. If set to low
, all bugs are reported. If set to
medium
(the default), medium and high priority bugs are reported. If set to high
,
only high priority bugs are reported.
The bug detectors which should be run. The bug detectors are specified by their class names, without any package qualification. By default, all detectors which are not disabled by default are run.
The filename of a filter specifying baseline bugs to exclude from being reported.
The filename of a filter specifying bugs to exclude from being reported.
The filename of a filter specifying which bugs are reported.
The filename of a filter specifying baseline bugs to exclude from being reported.
The filename of a filter specifying bugs to exclude from being reported.
The filename of a filter specifying which bugs are reported.
Gradle API 2.4