class FindBugs extends SourceTask
Analyzes code with FindBugs. See the FindBugs Manual for additional information on configuration options.
Type | Name and description |
---|---|
FileCollection |
classes The classes to be analyzed. |
FileCollection |
classpath Compile class path for the classes to be analyzed. |
String |
effort The analysis effort level. |
File |
excludeFilter The filename of a filter specifying bugs to exclude from being reported. |
FileCollection |
findbugsClasspath Class path holding the FindBugs library. |
boolean |
ignoreFailures Whether or not to allow the build to continue if there are warnings. |
File |
includeFilter The filename of a filter specifying which bugs are reported. |
String |
maxHeapSize The maximum heap size for the forked findbugs process (ex: '1g'). |
Collection<String> |
omitVisitors Similar to visitors except that it specifies bug detectors which should not be run.
|
FileCollection |
pluginClasspath Class path holding any additional FindBugs plugins. |
String |
reportLevel The priority threshold for reporting bugs. |
Collection<String> |
visitors The bug detectors which should be run. |
Constructor and description |
---|
FindBugs
() |
Type | Name and description |
---|---|
void |
evaluateResult(FindBugsResult result) For testing only. |
FindBugsSpec |
generateSpec() For testing only. |
Instantiator |
getInstantiator() |
FindBugsReports |
getReports() The reports to be generated by this task. |
Factory<WorkerProcessBuilder> |
getWorkerProcessBuilderFactory() |
FindBugsReports |
reports(Closure closure) Configures the reports to be generated by this task. |
void |
run() |
The classes to be analyzed.
Compile class path for the classes to be analyzed. The classes on this class path are used during analysis but aren't analyzed themselves.
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.
The filename of a filter specifying bugs to exclude from being reported.
Class path holding the FindBugs library.
Whether or not to allow the build to continue if there are warnings.
The filename of a filter specifying which bugs are reported.
The maximum heap size for the forked findbugs process (ex: '1g').
Similar to visitors
except that it specifies bug detectors which should not be run.
By default, no visitors are omitted.
Class path holding any additional FindBugs plugins.
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.
For testing only.
For testing only.
The reports to be generated by this task.
Configures the reports to be generated by this task. The contained reports can be configured by name and closures. Example:
findbugsTask { reports { xml { destination "build/findbugs.xml" } } }
closure
- The configurationGradle API 2.0