@Deprecated public class FindBugsExtension extends CodeQualityExtension
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" showProgress = true 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") }
FindBugsPlugin
Constructor | Description |
---|---|
FindBugsExtension(Project project) |
Deprecated.
|
Modifier and Type | Method | Description |
---|---|---|
String |
getEffort() |
Deprecated.
The analysis effort level.
|
File |
getExcludeBugsFilter() |
Deprecated.
The filename of a filter specifying baseline bugs to exclude from being reported.
|
TextResource |
getExcludeBugsFilterConfig() |
Deprecated.
A filter specifying baseline bugs to exclude from being reported.
|
File |
getExcludeFilter() |
Deprecated.
The filename of a filter specifying bugs to exclude from being reported.
|
TextResource |
getExcludeFilterConfig() |
Deprecated.
A filter specifying bugs to exclude from being reported.
|
Collection<String> |
getExtraArgs() |
Deprecated.
Any additional arguments (not covered here more explicitly like
effort ) to be passed along to FindBugs. |
File |
getIncludeFilter() |
Deprecated.
The filename of a filter specifying which bugs are reported.
|
TextResource |
getIncludeFilterConfig() |
Deprecated.
A filter specifying which bugs are reported.
|
Collection<String> |
getJvmArgs() |
Deprecated.
Any additional arguments to be passed along to FindBugs JVM process.
|
Collection<String> |
getOmitVisitors() |
Deprecated.
Similar to
visitors except that it specifies bug detectors which should not be run. |
String |
getReportLevel() |
Deprecated.
The priority threshold for reporting bugs.
|
Collection<String> |
getVisitors() |
Deprecated.
The bug detectors which should be run.
|
boolean |
isShowProgress() |
Deprecated.
Indicates whether analysis progress should be rendered on standard output.
|
void |
setEffort(String effort) |
Deprecated.
The analysis effort level.
|
void |
setExcludeBugsFilter(File filter) |
Deprecated.
The filename of a filter specifying baseline bugs to exclude from being reported.
|
void |
setExcludeBugsFilterConfig(TextResource excludeBugsFilterConfig) |
Deprecated.
A filter specifying baseline bugs to exclude from being reported.
|
void |
setExcludeFilter(File filter) |
Deprecated.
The filename of a filter specifying bugs to exclude from being reported.
|
void |
setExcludeFilterConfig(TextResource excludeFilterConfig) |
Deprecated.
A filter specifying bugs to exclude from being reported.
|
void |
setExtraArgs(Collection<String> extraArgs) |
Deprecated.
Any additional arguments (not covered here more explicitly like
effort ) to be passed along to FindBugs. |
void |
setIncludeFilter(File filter) |
Deprecated.
The filename of a filter specifying which bugs are reported.
|
void |
setIncludeFilterConfig(TextResource includeFilterConfig) |
Deprecated.
A filter specifying which bugs are reported.
|
void |
setJvmArgs(Collection<String> jvmArgs) |
Deprecated.
Any additional arguments to be passed along to FindBugs JVM process.
|
void |
setOmitVisitors(Collection<String> omitVisitors) |
Deprecated.
Similar to
visitors except that it specifies bug detectors which should not be run. |
void |
setReportLevel(String reportLevel) |
Deprecated.
The priority threshold for reporting bugs.
|
void |
setShowProgress(boolean showProgress) |
Deprecated.
Indicates whether analysis progress should be rendered on standard output.
|
void |
setVisitors(Collection<String> visitors) |
Deprecated.
The bug detectors which should be run.
|
getReportsDir, getSourceSets, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion
public FindBugsExtension(Project project)
public String getEffort()
min
, default
, or max
.
Higher levels increase precision and find more bugs at the expense of running time and memory consumption.public void setEffort(String effort)
min
, default
, or max
.
Higher levels increase precision and find more bugs at the expense of running time and memory consumption.public String getReportLevel()
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.public void setReportLevel(String reportLevel)
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.public Collection<String> getVisitors()
public void setVisitors(Collection<String> visitors)
public Collection<String> getOmitVisitors()
visitors
except that it specifies bug detectors which should not be run.
By default, no visitors are omitted.public void setOmitVisitors(Collection<String> omitVisitors)
visitors
except that it specifies bug detectors which should not be run.
By default, no visitors are omitted.@Nullable public TextResource getIncludeFilterConfig()
includeFilter
property.public void setIncludeFilterConfig(@Nullable TextResource includeFilterConfig)
includeFilter
property.@Nullable public File getIncludeFilter()
public void setIncludeFilter(File filter)
@Nullable public TextResource getExcludeFilterConfig()
excludeFilter
property.public void setExcludeFilterConfig(@Nullable TextResource excludeFilterConfig)
excludeFilter
property.@Nullable public File getExcludeFilter()
public void setExcludeFilter(File filter)
@Nullable public TextResource getExcludeBugsFilterConfig()
public void setExcludeBugsFilterConfig(@Nullable TextResource excludeBugsFilterConfig)
@Nullable public File getExcludeBugsFilter()
public void setExcludeBugsFilter(File filter)
public Collection<String> getExtraArgs()
effort
) to be passed along to FindBugs.
Extra arguments are passed to FindBugs after the arguments Gradle understands (like effort
but before the list of classes to analyze.
This should only be used for arguments that cannot be provided by Gradle directly.
Gradle does not try to interpret or validate the arguments before passing them to FindBugs.
See the FindBugs TextUICommandLine source for available options.
public void setExtraArgs(Collection<String> extraArgs)
effort
) to be passed along to FindBugs.
Extra arguments are passed to FindBugs after the arguments Gradle understands (like effort
but before the list of classes to analyze.
This should only be used for arguments that cannot be provided by Gradle directly.
Gradle does not try to interpret or validate the arguments before passing them to FindBugs.
See the FindBugs TextUICommandLine source for available options.
@Incubating public Collection<String> getJvmArgs()
Arguments can contain general JVM flags like -Xdebug
and also FindBugs system properties like -Dfindbugs.loadPropertiesFrom=...
@Incubating public void setJvmArgs(Collection<String> jvmArgs)
Arguments can contain general JVM flags like -Xdebug
and also FindBugs system properties like -Dfindbugs.loadPropertiesFrom=...
@Incubating public boolean isShowProgress()
@Incubating public void setShowProgress(boolean showProgress)