public abstract class FindBugs
extends java.lang.Object
FindBugs2
.Modifier and Type | Field | Description |
---|---|---|
static boolean |
DEBUG |
Debug tracing.
|
static AnalysisFeatureSetting[] |
DEFAULT_EFFORT |
Analysis settings for -effort:default.
|
static java.util.Set<java.lang.String> |
knownURLProtocolSet |
Known URL protocols.
|
static AnalysisFeatureSetting[] |
LESS_EFFORT |
Analysis settings for -effort:less.
|
static AnalysisFeatureSetting[] |
MAX_EFFORT |
Analysis settings for -effort:max.
|
static AnalysisFeatureSetting[] |
MIN_EFFORT |
Analysis settings for -effort:min.
|
static long |
MINIMUM_TIMESTAMP |
|
static AnalysisFeatureSetting[] |
MORE_EFFORT |
Analysis settings for -effort:more.
|
static boolean |
noAnalysis |
Constructor | Description |
---|---|
FindBugs() |
Modifier and Type | Method | Description |
---|---|---|
static void |
configureBaselineFilter(DelegatingBugReporter bugReporter,
java.lang.String baselineFileName) |
Configure a baseline bug instance filter.
|
static void |
configureBugCollection(IFindBugsEngine findBugs) |
Configure the BugCollection (if the BugReporter being used
is constructing one).
|
static void |
configureFilter(DelegatingBugReporter bugReporter,
java.lang.String filterFileName,
boolean include) |
Configure the (bug instance) Filter for the given DelegatingBugReporter.
|
static void |
configureTrainingDatabases(IFindBugsEngine findBugs) |
Configure training databases.
|
static java.lang.String |
getHome() |
Get the FindBugs home directory.
|
static java.util.Set<java.lang.String> |
handleBugCategories(UserPreferences userPreferences,
java.lang.String categories) |
Process -bugCategories option.
|
static boolean |
isDetectorEnabled(IFindBugsEngine findBugs,
DetectorFactory factory,
int rankThreshold) |
Determing whether or not given DetectorFactory should be enabled.
|
static void |
processCommandLine(TextUICommandLine commandLine,
java.lang.String[] argv,
IFindBugsEngine findBugs) |
Process the command line.
|
static void |
runMain(IFindBugsEngine findBugs,
TextUICommandLine commandLine) |
Given a fully-configured IFindBugsEngine and the TextUICommandLine
used to configure it, execute the analysis.
|
static void |
setHome(java.lang.String home) |
Set the FindBugs home directory.
|
static void |
showCommandLineOptions() |
Print command line options synopses to stdout.
|
static void |
showCommandLineOptions(TextUICommandLine commandLine) |
Print command line options synopses to stdout.
|
static void |
showHelp(TextUICommandLine commandLine) |
Show -help message.
|
static void |
showSynopsis() |
Show the overall FindBugs command synopsis.
|
static boolean |
validTimestamp(long timestamp) |
public static final AnalysisFeatureSetting[] MIN_EFFORT
public static final AnalysisFeatureSetting[] LESS_EFFORT
public static final AnalysisFeatureSetting[] DEFAULT_EFFORT
public static final AnalysisFeatureSetting[] MORE_EFFORT
public static final AnalysisFeatureSetting[] MAX_EFFORT
public static final boolean DEBUG
public static boolean noAnalysis
public static final java.util.Set<java.lang.String> knownURLProtocolSet
public static final long MINIMUM_TIMESTAMP
public static void setHome(java.lang.String home)
public static java.lang.String getHome()
public static void configureTrainingDatabases(IFindBugsEngine findBugs) throws java.io.IOException
findBugs
- the IFindBugsEngine to configurejava.io.IOException
public static boolean isDetectorEnabled(IFindBugsEngine findBugs, DetectorFactory factory, int rankThreshold)
findBugs
- the IFindBugsEnginefactory
- the DetectorFactoryrankThreshold
- TODOpublic static java.util.Set<java.lang.String> handleBugCategories(UserPreferences userPreferences, java.lang.String categories)
userPreferences
- UserPreferences representing which Detectors are enabledcategories
- comma-separated list of bug categoriespublic static void processCommandLine(TextUICommandLine commandLine, java.lang.String[] argv, IFindBugsEngine findBugs) throws java.io.IOException, FilterException
commandLine
- the TextUICommandLine object which will parse the command lineargv
- the command line argumentsfindBugs
- the IFindBugsEngine to configurejava.io.IOException
FilterException
public static void showHelp(TextUICommandLine commandLine)
commandLine
- public static void runMain(IFindBugsEngine findBugs, TextUICommandLine commandLine) throws java.io.IOException, java.lang.RuntimeException
findBugs
- a fully-configured IFindBugsEnginecommandLine
- the TextUICommandLine used to configure the IFindBugsEnginejava.io.IOException
java.lang.RuntimeException
public static void showCommandLineOptions()
public static void showCommandLineOptions(TextUICommandLine commandLine)
commandLine
- the TextUICommandLine whose options should be printedpublic static void showSynopsis()
public static void configureFilter(DelegatingBugReporter bugReporter, java.lang.String filterFileName, boolean include) throws java.io.IOException, FilterException
bugReporter
- a DelegatingBugReporterfilterFileName
- filter file nameinclude
- true if the filter is an include filter, false if it's an exclude filterjava.io.IOException
FilterException
public static void configureBaselineFilter(DelegatingBugReporter bugReporter, java.lang.String baselineFileName) throws java.io.IOException, org.dom4j.DocumentException
bugReporter
- a DelegatingBugReporterbaselineFileName
- filename of baseline Filterjava.io.IOException
org.dom4j.DocumentException
public static void configureBugCollection(IFindBugsEngine findBugs)
findBugs
- the IFindBugsEnginepublic static boolean validTimestamp(long timestamp)
timestamp
- FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.