open class FindBugsExtension : CodeQualityExtension
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" 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
FindBugsPlugin
FindBugsExtension(project: Project) |
open fun getEffort(): String
The analysis effort level. The value specified should be one of |
|
open fun getExcludeBugsFilter(): File
The filename of a filter specifying baseline bugs to exclude from being reported. |
|
open fun getExcludeBugsFilterConfig(): TextResource
A filter specifying baseline bugs to exclude from being reported. |
|
open fun getExcludeFilter(): File
The filename of a filter specifying bugs to exclude from being reported. |
|
open fun getExcludeFilterConfig(): TextResource
A filter specifying bugs to exclude from being reported. Replaces the |
|
open fun getExtraArgs(): MutableCollection<String>
Any additional arguments (not covered here more explicitly like Extra arguments are passed to FindBugs after the arguments Gradle understands (like See the FindBugs TextUICommandLine source for available options. |
|
open fun getIncludeFilter(): File
The filename of a filter specifying which bugs are reported. |
|
open fun getIncludeFilterConfig(): TextResource
A filter specifying which bugs are reported. Replaces the |
|
open fun getJvmArgs(): MutableCollection<String>
Any additional arguments to be passed along to FindBugs JVM process. Arguments can contain general JVM flags like |
|
open fun getOmitVisitors(): MutableCollection<String>
Similar to |
|
open fun getReportLevel(): String
The priority threshold for reporting bugs. If set to |
|
open fun getVisitors(): MutableCollection<String>
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. |
|
open fun isShowProgress(): Boolean
Indicates whether analysis progress should be rendered on standard output. Defaults to false. |
|
open fun setEffort(effort: String): Unit
The analysis effort level. The value specified should be one of |
|
open fun setExcludeBugsFilter(filter: File): Unit
The filename of a filter specifying baseline bugs to exclude from being reported. |
|
open fun setExcludeBugsFilterConfig(excludeBugsFilterConfig: TextResource): Unit
A filter specifying baseline bugs to exclude from being reported. |
|
open fun setExcludeFilter(filter: File): Unit
The filename of a filter specifying bugs to exclude from being reported. |
|
open fun setExcludeFilterConfig(excludeFilterConfig: TextResource): Unit
A filter specifying bugs to exclude from being reported. Replaces the |
|
open fun setExtraArgs(extraArgs: MutableCollection<String>): Unit
Any additional arguments (not covered here more explicitly like Extra arguments are passed to FindBugs after the arguments Gradle understands (like See the FindBugs TextUICommandLine source for available options. |
|
open fun setIncludeFilter(filter: File): Unit
The filename of a filter specifying which bugs are reported. |
|
open fun setIncludeFilterConfig(includeFilterConfig: TextResource): Unit
A filter specifying which bugs are reported. Replaces the |
|
open fun setJvmArgs(jvmArgs: MutableCollection<String>): Unit
Any additional arguments to be passed along to FindBugs JVM process. Arguments can contain general JVM flags like |
|
open fun setOmitVisitors(omitVisitors: MutableCollection<String>): Unit
Similar to |
|
open fun setReportLevel(reportLevel: String): Unit
The priority threshold for reporting bugs. If set to |
|
open fun setShowProgress(showProgress: Boolean): Unit
Indicates whether analysis progress should be rendered on standard output. |
|
open fun setVisitors(visitors: MutableCollection<String>): Unit
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. |
open fun getReportsDir(): File
The directory where reports will be generated. |
|
open fun getSourceSets(): MutableCollection<SourceSet>
The source sets to be analyzed as part of the check and build tasks. |
|
open fun getToolVersion(): String
The version of the code quality tool to be used. |
|
open fun isIgnoreFailures(): Boolean
Whether to allow the build to continue if there are warnings. Example: ignoreFailures = true |
|
open fun setIgnoreFailures(ignoreFailures: Boolean): Unit
Whether to allow the build to continue if there are warnings. Example: ignoreFailures = true |
|
open fun setReportsDir(reportsDir: File): Unit
The directory where reports will be generated. |
|
open fun setSourceSets(sourceSets: MutableCollection<SourceSet>): Unit
The source sets to be analyzed as part of the check and build tasks. |
|
open fun setToolVersion(toolVersion: String): Unit
The version of the code quality tool to be used. |
val FindBugsExtension.ext: ExtraPropertiesExtension
Retrieves the ext extension. |
fun FindBugsExtension.ext(configure: ExtraPropertiesExtension.() -> Unit): Unit
Configures the ext extension. |