Class FindBugsExtension
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")
}
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.The analysis effort level.Deprecated.The filename of a filter specifying baseline bugs to exclude from being reported.Deprecated.A filter specifying baseline bugs to exclude from being reported.Deprecated.The filename of a filter specifying bugs to exclude from being reported.Deprecated.A filter specifying bugs to exclude from being reported.Deprecated.Any additional arguments (not covered here more explicitly likeeffort) to be passed along to FindBugs.Deprecated.The filename of a filter specifying which bugs are reported.Deprecated.A filter specifying which bugs are reported.Deprecated.Any additional arguments to be passed along to FindBugs JVM process.Deprecated.Similar tovisitorsexcept that it specifies bug detectors which should not be run.Deprecated.The priority threshold for reporting bugs.Deprecated.The bug detectors which should be run.booleanDeprecated.Indicates whether analysis progress should be rendered on standard output.voidDeprecated.The analysis effort level.voidsetExcludeBugsFilter(File filter) Deprecated.The filename of a filter specifying baseline bugs to exclude from being reported.voidsetExcludeBugsFilterConfig(TextResource excludeBugsFilterConfig) Deprecated.A filter specifying baseline bugs to exclude from being reported.voidsetExcludeFilter(File filter) Deprecated.The filename of a filter specifying bugs to exclude from being reported.voidsetExcludeFilterConfig(TextResource excludeFilterConfig) Deprecated.A filter specifying bugs to exclude from being reported.voidsetExtraArgs(Collection<String> extraArgs) Deprecated.Any additional arguments (not covered here more explicitly likeeffort) to be passed along to FindBugs.voidsetIncludeFilter(File filter) Deprecated.The filename of a filter specifying which bugs are reported.voidsetIncludeFilterConfig(TextResource includeFilterConfig) Deprecated.A filter specifying which bugs are reported.voidsetJvmArgs(Collection<String> jvmArgs) Deprecated.Any additional arguments to be passed along to FindBugs JVM process.voidsetOmitVisitors(Collection<String> omitVisitors) Deprecated.Similar tovisitorsexcept that it specifies bug detectors which should not be run.voidsetReportLevel(String reportLevel) Deprecated.The priority threshold for reporting bugs.voidsetShowProgress(boolean showProgress) Deprecated.Indicates whether analysis progress should be rendered on standard output.voidsetVisitors(Collection<String> visitors) Deprecated.The bug detectors which should be run.Methods inherited from class CodeQualityExtension
getReportsDir, getSourceSets, getToolVersion, isIgnoreFailures, setIgnoreFailures, setReportsDir, setSourceSets, setToolVersion
-
Constructor Details
-
FindBugsExtension
Deprecated.
-
-
Method Details
-
getEffort
Deprecated.The analysis effort level. The value specified should be one ofmin,default, ormax. Higher levels increase precision and find more bugs at the expense of running time and memory consumption. -
setEffort
Deprecated.The analysis effort level. The value specified should be one ofmin,default, ormax. Higher levels increase precision and find more bugs at the expense of running time and memory consumption. -
getReportLevel
Deprecated.The priority threshold for reporting bugs. If set tolow, all bugs are reported. If set tomedium(the default), medium and high priority bugs are reported. If set tohigh, only high priority bugs are reported. -
setReportLevel
Deprecated.The priority threshold for reporting bugs. If set tolow, all bugs are reported. If set tomedium(the default), medium and high priority bugs are reported. If set tohigh, only high priority bugs are reported. -
getVisitors
Deprecated.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. -
setVisitors
Deprecated.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. -
getOmitVisitors
Deprecated.Similar tovisitorsexcept that it specifies bug detectors which should not be run. By default, no visitors are omitted. -
setOmitVisitors
Deprecated.Similar tovisitorsexcept that it specifies bug detectors which should not be run. By default, no visitors are omitted. -
getIncludeFilterConfig
Deprecated.A filter specifying which bugs are reported. Replaces theincludeFilterproperty.- Since:
- 2.2
-
setIncludeFilterConfig
Deprecated.A filter specifying which bugs are reported. Replaces theincludeFilterproperty.- Since:
- 2.2
-
getIncludeFilter
Deprecated.The filename of a filter specifying which bugs are reported. -
setIncludeFilter
Deprecated.The filename of a filter specifying which bugs are reported. -
getExcludeFilterConfig
Deprecated.A filter specifying bugs to exclude from being reported. Replaces theexcludeFilterproperty.- Since:
- 2.2
-
setExcludeFilterConfig
Deprecated.A filter specifying bugs to exclude from being reported. Replaces theexcludeFilterproperty.- Since:
- 2.2
-
getExcludeFilter
Deprecated.The filename of a filter specifying bugs to exclude from being reported. -
setExcludeFilter
Deprecated.The filename of a filter specifying bugs to exclude from being reported. -
getExcludeBugsFilterConfig
Deprecated.A filter specifying baseline bugs to exclude from being reported.- Since:
- 2.4
-
setExcludeBugsFilterConfig
Deprecated.A filter specifying baseline bugs to exclude from being reported.- Since:
- 2.4
-
getExcludeBugsFilter
Deprecated.The filename of a filter specifying baseline bugs to exclude from being reported. -
setExcludeBugsFilter
Deprecated.The filename of a filter specifying baseline bugs to exclude from being reported. -
getExtraArgs
Deprecated.Any additional arguments (not covered here more explicitly likeeffort) to be passed along to FindBugs.Extra arguments are passed to FindBugs after the arguments Gradle understands (like
effortbut 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.
- Since:
- 2.6
-
setExtraArgs
Deprecated.Any additional arguments (not covered here more explicitly likeeffort) to be passed along to FindBugs.Extra arguments are passed to FindBugs after the arguments Gradle understands (like
effortbut 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.
- Since:
- 2.6
-
getJvmArgs
Deprecated.Any additional arguments to be passed along to FindBugs JVM process.Arguments can contain general JVM flags like
-Xdebugand also FindBugs system properties like-Dfindbugs.loadPropertiesFrom=...- Since:
- 4.3
-
setJvmArgs
Deprecated.Any additional arguments to be passed along to FindBugs JVM process.Arguments can contain general JVM flags like
-Xdebugand also FindBugs system properties like-Dfindbugs.loadPropertiesFrom=...- Since:
- 4.3
-
isShowProgress
Deprecated.Indicates whether analysis progress should be rendered on standard output. Defaults to false.- Since:
- 4.2
-
setShowProgress
Deprecated.Indicates whether analysis progress should be rendered on standard output.- Since:
- 4.2
-