# FindBugsExtension

API Documentation: | `FindBugsExtension`

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")
    }

### Properties

Property | Description
`effort` | 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.
`excludeFilter` | The filename of a filter specifying bugs to exclude from being reported.
`excludeFilterConfig` | Incubating A filter specifying bugs to exclude from being reported. Replaces the `excludeFilter` property.
`ignoreFailures` | Whether to allow the build to continue if there are warnings. Example: ignoreFailures = true
`includeFilter` | The filename of a filter specifying which bugs are reported.
`includeFilterConfig` | Incubating A filter specifying which bugs are reported. Replaces the `includeFilter` property.
`omitVisitors` | Similar to `visitors` except that it specifies bug detectors which should not be run. By default, no visitors are omitted.
`reportLevel` | 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.
`reportsDir` | The directory where reports will be generated.
`showProgress` | Incubating Indicates whether analysis progress should be rendered on standard output. Defaults to false.
`sourceSets` | The source sets to be analyzed as part of the `check` and `build` tasks.
`toolVersion` | The version of the code quality tool to be used.
`visitors` | 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.

### Methods

No methods

### Script blocks

No script blocks

### Property details

#### `String` `effort`

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.

Default:
  `'default'`

#### `File` `excludeFilter`

The filename of a filter specifying bugs to exclude from being reported.

Default:
  `null`

#### `TextResource` `excludeFilterConfig`

Note: This property is incubating and may change in a future version of Gradle.

A filter specifying bugs to exclude from being reported. Replaces the `excludeFilter` property.

Default:
  `null`

#### `boolean` `ignoreFailures`

Whether to allow the build to continue if there are warnings. Example: ignoreFailures = true

Default:
  `false`

#### `File` `includeFilter`

The filename of a filter specifying which bugs are reported.

Default:
  `null`

#### `TextResource` `includeFilterConfig`

Note: This property is incubating and may change in a future version of Gradle.

A filter specifying which bugs are reported. Replaces the `includeFilter` property.

Default:
  `null`

#### ``Collection`<`String`>` `omitVisitors`

Similar to `visitors` except that it specifies bug detectors which should not be run. By default, no visitors are omitted.

Default:
  `[]`

#### `String` `reportLevel`

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.

Default:
  `'medium'`

#### `File` `reportsDir`

The directory where reports will be generated.

#### `boolean` `showProgress`

Note: This property is incubating and may change in a future version of Gradle.

Indicates whether analysis progress should be rendered on standard output. Defaults to false.

Default:
  `false`

#### ``Collection`<`SourceSet`>` `sourceSets`

The source sets to be analyzed as part of the `check` and `build` tasks.

Default:
  `project.sourceSets`

#### `String` `toolVersion`

The version of the code quality tool to be used.

#### ``Collection`<`String`>` `visitors`

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.

Default:
  `[]`