Package: org.gradle.api.plugins.quality

## [Groovy] Class FindBugs

- org.gradle.api.plugins.quality.FindBugs

- All Implemented Interfaces and Traits:
    Reporting, VerificationTask

      class FindBugs
      extends SourceTask

  Analyzes code with FindBugs. See the FindBugs Manual for additional information on configuration options.

- - ### Properties Summary

    Properties
    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 Summary

    Constructors
    Constructor and description
    `FindBugs ()`

  - ### Methods Summary

    Methods
    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()`

- - ### Property Detail

    - #### @SkipWhenEmpty @InputFiles FileCollection classes

      The classes to be analyzed.

    - #### @InputFiles FileCollection classpath

      Compile class path for the classes to be analyzed. The classes on this class path are used during analysis but aren't analyzed themselves.

    - #### @Input @Optional 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.

    - #### @InputFile @Optional File excludeFilter

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

    - #### @InputFiles FileCollection findbugsClasspath

      Class path holding the FindBugs library.

    - #### boolean ignoreFailures

      Whether or not to allow the build to continue if there are warnings.

    - #### @InputFile @Optional File includeFilter

      The filename of a filter specifying which bugs are reported.

    - #### @Input @Optional String maxHeapSize

      The maximum heap size for the forked findbugs process (ex: '1g').

    - #### @Input @Optional Collection<String> omitVisitors

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

    - #### @InputFiles FileCollection pluginClasspath

      Class path holding any additional FindBugs plugins.

    - #### @Input @Optional 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.

    - #### @Input @Optional 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.

  - ### Constructor Detail

    - #### FindBugs()

  - ### Method Detail

    - #### @PackageScope void evaluateResult(FindBugsResult result)

      For testing only.

    - #### @PackageScope FindBugsSpec generateSpec()

      For testing only.

    - #### @Inject Instantiator getInstantiator()

    - #### FindBugsReports getReports()

      The reports to be generated by this task.

      Returns:
        The reports container

    - #### @Inject Factory<WorkerProcessBuilder> getWorkerProcessBuilderFactory()

    - #### FindBugsReports reports(Closure closure)

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

      Parameters:
        `closure` - The configuration
      Returns:
        The reports container

    - #### @TaskAction void run()