public class FindBugsTask extends AbstractFindBugsTask
createSystemProperty
Modifier and Type | Class and Description |
---|---|
static class |
FindBugsTask.ClassLocation |
AbstractFindBugsTask.SystemProperty
DEFAULT_TIMEOUT, errorProperty, execResultProperty, FINDBUGS_JAR, RESULT_PROPERTY_SUFFIX
Constructor and Description |
---|
FindBugsTask() |
Modifier and Type | Method and Description |
---|---|
void |
addFileset(org.apache.tools.ant.types.FileSet fs)
Add a nested fileset of classes or jar files.
|
protected void |
afterExecuteJavaProcess(int rc) |
protected void |
beforeExecuteJavaProcess() |
protected void |
checkParameters()
Check that all required attributes have been set
|
protected void |
configureFindbugsEngine() |
org.apache.tools.ant.types.Path |
createAuxAnalyzepath()
Path to use for auxAnalyzepath.
|
org.apache.tools.ant.types.Path |
createAuxClasspath()
Path to use for auxclasspath.
|
FindBugsTask.ClassLocation |
createClass()
Add a class location
|
org.apache.tools.ant.types.Path |
createSourcePath()
Path to use for sourcepath.
|
void |
setAdjustExperimental(boolean adjustExperimental)
Set the adjustExperimental flag
|
void |
setAdjustPriority(java.lang.String adjustPriorityString) |
void |
setApplySuppression(boolean flag)
Set the quietErrors flag
|
void |
setAuxAnalyzepath(org.apache.tools.ant.types.Path src)
the auxAnalyzepath to use.
|
void |
setAuxAnalyzepathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a sourcepath defined elsewhere.
|
void |
setAuxClasspath(org.apache.tools.ant.types.Path src)
the auxclasspath to use.
|
void |
setAuxClasspathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a sourcepath defined elsewhere.
|
void |
setBaselineBugs(java.io.File baselineBugs)
Set the exclude filter file
|
void |
setChooseVisitors(java.lang.String commaSeperatedString)
Set the specific visitors to use
|
void |
setCloud(java.lang.String cloudId) |
void |
setConserveSpace(boolean flag)
Set the conserveSpace flag.
|
void |
setEffort(java.lang.String effort)
Set effort level.
|
void |
setExcludeFilter(java.io.File filterFile)
Set the exclude filter file
|
void |
setIncludeFilter(java.io.File filterFile)
Set the exclude filter file
|
void |
setMaxRank(int maxRank) |
void |
setNested(boolean nested)
Set the nested flag.
|
void |
setNoClassOk(boolean noClassOk)
Set the noClassOk flag.
|
void |
setOmitVisitors(java.lang.String commaSeperatedString)
Set the specific visitors to use
|
void |
setOnlyAnalyze(java.lang.String filter)
Set the packages or classes to analyze
|
void |
setOutput(java.lang.String format)
Set the output format
|
void |
setOutputFile(java.lang.String outputFileName)
Set name of output file.
|
void |
setProjectFile(java.io.File projectFile)
Set the project file
|
void |
setProjectName(java.lang.String projectName)
Set project name
|
void |
setQuietErrors(boolean flag)
Set the quietErrors flag
|
void |
setRelaxed(boolean relaxed)
Set the relaxed flag.
|
void |
setReportLevel(java.lang.String level)
Set the report level
|
void |
setSetExitCode(boolean setExitCode)
Set the exit code flag.
|
void |
setSort(boolean flag)
Set the sorted flag
|
void |
setSourcePath(org.apache.tools.ant.types.Path src)
the sourcepath to use.
|
void |
setSourcePathRef(org.apache.tools.ant.types.Reference r)
Adds a reference to a source path defined elsewhere.
|
void |
setStylesheet(java.lang.String stylesheet)
Set the stylesheet filename for HTML generation.
|
void |
setTimestampNow(boolean flag)
Set the timestampNow flag
|
void |
setUserPreferencesFile(java.io.File userPreferencesFile)
Set the project file
|
void |
setVisitors(java.lang.String commaSeperatedString)
Set the specific visitors to use
|
void |
setWarningsProperty(java.lang.String name)
Tells this task to set the property with the given name to "true" when
bugs were found.
|
void |
setWorkHard(boolean workHard)
Set the workHard flag.
|
addArg, createClasspath, createFindbugsEngine, createPluginList, createSystemProperty, execute, getDebug, getFindbugsEngine, setClasspath, setClasspathRef, setDebug, setErrorProperty, setFailOnError, setHome, setInputString, setJvm, setJvmargs, setPluginList, setPluginListRef, setTimeout
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void setWorkHard(boolean workHard)
workHard
- true if we want findbugs to run with workHard option enabledpublic void setSetExitCode(boolean setExitCode)
setExitCode
- If true then the exit code will be returned to
the main ant jobpublic void setNested(boolean nested)
nested
- This option enables or disables scanning of
nested jar and zip files found in the list of files
and directories to be analyzed. By default, scanning
of nested jar/zip files is enabledpublic void setNoClassOk(boolean noClassOk)
noClassOk
- true if we should generate no-error output if no classfiles
are specifiedpublic void setRelaxed(boolean relaxed)
relaxed
- true if we want findbugs to run with relaxed option enabledpublic void setAdjustExperimental(boolean adjustExperimental)
adjustExperimental
- true if we want experimental bug patterns to have lower
prioritypublic void setAdjustPriority(java.lang.String adjustPriorityString)
public void setVisitors(java.lang.String commaSeperatedString)
public void setChooseVisitors(java.lang.String commaSeperatedString)
public void setOmitVisitors(java.lang.String commaSeperatedString)
public void setOutput(java.lang.String format)
public void setStylesheet(java.lang.String stylesheet)
public void setReportLevel(java.lang.String level)
public void setSort(boolean flag)
public void setTimestampNow(boolean flag)
public void setQuietErrors(boolean flag)
public void setApplySuppression(boolean flag)
public void setWarningsProperty(java.lang.String name)
public void setEffort(java.lang.String effort)
effort
- the effort levelpublic void setCloud(java.lang.String cloudId)
public void setMaxRank(int maxRank)
public void setProjectName(java.lang.String projectName)
projectName
- the project namepublic void setConserveSpace(boolean flag)
public void setExcludeFilter(java.io.File filterFile)
public void setIncludeFilter(java.io.File filterFile)
public void setBaselineBugs(java.io.File baselineBugs)
public void setProjectFile(java.io.File projectFile)
public void setUserPreferencesFile(java.io.File userPreferencesFile)
public void setAuxClasspath(org.apache.tools.ant.types.Path src)
public org.apache.tools.ant.types.Path createAuxClasspath()
public void setAuxClasspathRef(org.apache.tools.ant.types.Reference r)
public void setAuxAnalyzepath(org.apache.tools.ant.types.Path src)
public org.apache.tools.ant.types.Path createAuxAnalyzepath()
public void setAuxAnalyzepathRef(org.apache.tools.ant.types.Reference r)
public void setSourcePath(org.apache.tools.ant.types.Path src)
public org.apache.tools.ant.types.Path createSourcePath()
public void setSourcePathRef(org.apache.tools.ant.types.Reference r)
public FindBugsTask.ClassLocation createClass()
public void setOutputFile(java.lang.String outputFileName)
public void setOnlyAnalyze(java.lang.String filter)
public void addFileset(org.apache.tools.ant.types.FileSet fs)
protected void checkParameters()
checkParameters
in class AbstractFindBugsTask
protected void beforeExecuteJavaProcess()
beforeExecuteJavaProcess
in class AbstractFindBugsTask
protected void afterExecuteJavaProcess(int rc)
afterExecuteJavaProcess
in class AbstractFindBugsTask
protected void configureFindbugsEngine()
configureFindbugsEngine
in class AbstractFindBugsTask
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.