Movatterモバイル変換


[0]ホーム

URL:


FindBugs

Table of Contents

Properties
Methods
Script blocks
Property details
Method details
Script block details
API Documentation:FindBugs

Analyzes code withFindBugs. See theFindBugs Manual for additional information on configurationoptions.

Properties

PropertyDescription
classes

The class directories to be analyzed.

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.

effort

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 timeand 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 theexcludeFilter property.

excludes

The set of exclude patterns.

findbugsClasspath

Class path holding the FindBugs library.

ignoreFailures

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

includeFilter

The filename of a filter specifying which bugs are reported.

includeFilterConfig
Incubating

A filter specifying which bugs are reported. Replaces theincludeFilter property.

includes

The set of include patterns.

maxHeapSize

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

omitVisitors

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

pluginClasspath

Class path holding any additional FindBugs plugins.

reportLevel

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.

reports

The reports to be generated by this task.

showProgress

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

source

The source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.

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 arerun.

Methods

MethodDescription
exclude(excludeSpec)

Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed aFileTreeElement as its parameter. The closure should return true or false. Example:

exclude(excludes)

Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not matchany exclude pattern to be processed.

exclude(excludes)

Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not matchany exclude pattern to be processed.

exclude(excludeSpec)

Adds an exclude spec. This method may be called multiple times to append new specs.If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not matchany exclude pattern to be processed.

include(includeSpec)

Adds an include spec. This method may be called multiple times to append new specs. The given closure is passed aFileTreeElement as its parameter.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns or specs to be included.

include(includes)

Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns to be processed.

include(includes)

Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns to be processed.

include(includeSpec)

Adds an include spec. This method may be called multiple times to append new specs.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns or specs to be included.

reports(configureAction)

Configures the reports to be generated by this task.The contained reports can be configured by name and closures. Example:

source(sources)

Adds some source to this task. The given source objects will be evaluated as perProject.files(java.lang.Object[]).

Script blocks

BlockDescription
reports

Configures the reports to be generated by this task.The contained reports can be configured by name and closures. Example:

Property details

The class directories to be analyzed.

Default withfindbugs plugin:
sourceSet.output.classesDirs

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

Default withfindbugs plugin:
sourceSet.compileClasspath

Stringeffort

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 timeand memory consumption.

Default withfindbugs plugin:
project.findbugs.effort

FileexcludeFilter

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

Default withfindbugs plugin:
project.findbugs.excludeFilter

TextResourceexcludeFilterConfig

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

A filter specifying bugs to exclude from being reported. Replaces theexcludeFilter property.

Default withfindbugs plugin:
project.findbugs.excludeFilterConfig

Set<String>excludes

The set of exclude patterns.

FileCollectionfindbugsClasspath

Class path holding the FindBugs library.

Default withfindbugs plugin:
project.configurations.findbugs

booleanignoreFailures

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

Default withfindbugs plugin:
project.findbugs.ignoreFailures

FileincludeFilter

The filename of a filter specifying which bugs are reported.

Default withfindbugs plugin:
project.findbugs.includeFilter

TextResourceincludeFilterConfig

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

A filter specifying which bugs are reported. Replaces theincludeFilter property.

Default withfindbugs plugin:
project.findbugs.includeFilterConfig

Set<String>includes

The set of include patterns.

StringmaxHeapSize

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

Default withfindbugs plugin:
null

Collection<String>omitVisitors

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

Default withfindbugs plugin:
project.findbugs.omitVisitors

FileCollectionpluginClasspath

Class path holding any additional FindBugs plugins.

Default withfindbugs plugin:
project.configurations.findbugsPlugins

StringreportLevel

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.

Default withfindbugs plugin:
project.findbugs.reportLevel

FindBugsReportsreports (read-only)

The reports to be generated by this task.

booleanshowProgress

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

Default withfindbugs plugin:
project.findbugs.showProgress

FileTreesource (read-only)

The source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.

Default withfindbugs plugin:
sourceSet.allJava

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 arerun.

Default withfindbugs plugin:
project.findbugs.visitors

Method details

SourceTaskexclude(Closure excludeSpec)

Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed aFileTreeElement as its parameter. The closure should return true or false. Example:

copySpec {  from'source'  into'destination'//an example of excluding files from certain configuration:  exclude { it.file in configurations.someConf.files }}

If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not matchany exclude pattern to be processed.

SourceTaskexclude(Iterable<String> excludes)

Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not matchany exclude pattern to be processed.

SourceTaskexclude(String... excludes)

Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not matchany exclude pattern to be processed.

SourceTaskexclude(Spec<FileTreeElement> excludeSpec)

Adds an exclude spec. This method may be called multiple times to append new specs.If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not matchany exclude pattern to be processed.

SourceTaskinclude(Closure includeSpec)

Adds an include spec. This method may be called multiple times to append new specs. The given closure is passed aFileTreeElement as its parameter.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns or specs to be included.

SourceTaskinclude(Iterable<String> includes)

Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns to be processed.

SourceTaskinclude(String... includes)

Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiplepatterns may be specified in a single call.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns to be processed.

SourceTaskinclude(Spec<FileTreeElement> includeSpec)

Adds an include spec. This method may be called multiple times to append new specs.If includes are not provided, then all files in this container will be included. If includes are provided, then afile must match at least one of the include patterns or specs to be included.

FindBugsReportsreports(Action<? superFindBugsReports> configureAction)

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

SourceTasksource(Object... sources)

Adds some source to this task. The given source objects will be evaluated as perProject.files(java.lang.Object[]).

Script block details

reports { }

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"    }  }}
Delegates to:
FindBugsReports fromreports

[8]ページ先頭

©2009-2025 Movatter.jp