Package com.google.errorprone
Class ErrorProneOptions
java.lang.Object
com.google.errorprone.ErrorProneOptions
public class ErrorProneOptions extends Object
Processes command-line options specific to error-prone.
Documentation for the available flags are available at https://errorprone.infoflags
- Author:
- eaftan@google.com (Eddie Aftandilian)
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ErrorProneOptions.Severity
Severity levels for an error-prone check that define how the check results should be presented. -
Method Summary
Modifier and Type Method Description boolean
disableWarningsInGeneratedCode()
static ErrorProneOptions
empty()
Pattern
getExcludedPattern()
ErrorProneFlags
getFlags()
String[]
getRemainingArgs()
com.google.common.collect.ImmutableMap<String,ErrorProneOptions.Severity>
getSeverityMap()
boolean
ignoreLargeCodeGenerators()
boolean
ignoreUnknownChecks()
boolean
isDisableAllChecks()
boolean
isDisableAllWarnings()
boolean
isDropErrorsToWarnings()
boolean
isEnableAllChecksAsWarnings()
boolean
isIgnoreSuppressionAnnotations()
static int
isSupportedOption(String option)
boolean
isTestOnlyTarget()
com.google.errorprone.ErrorProneOptions.PatchingOptions
patchingOptions()
static ErrorProneOptions
processArgs(Iterable<String> args)
Given a list of command-line arguments, produce the correspondingErrorProneOptions
instance.static ErrorProneOptions
processArgs(String[] args)
Given a list of command-line arguments, produce the correspondingErrorProneOptions
instance.
-
Method Details
-
isSupportedOption
-
isEnableAllChecksAsWarnings
public boolean isEnableAllChecksAsWarnings() -
isDisableAllChecks
public boolean isDisableAllChecks() -
getRemainingArgs
-
getSeverityMap
-
ignoreUnknownChecks
public boolean ignoreUnknownChecks() -
disableWarningsInGeneratedCode
public boolean disableWarningsInGeneratedCode() -
isDisableAllWarnings
public boolean isDisableAllWarnings() -
isDropErrorsToWarnings
public boolean isDropErrorsToWarnings() -
isTestOnlyTarget
public boolean isTestOnlyTarget() -
isIgnoreSuppressionAnnotations
public boolean isIgnoreSuppressionAnnotations() -
ignoreLargeCodeGenerators
public boolean ignoreLargeCodeGenerators() -
getFlags
-
patchingOptions
public com.google.errorprone.ErrorProneOptions.PatchingOptions patchingOptions() -
getExcludedPattern
-
empty
-
processArgs
Given a list of command-line arguments, produce the correspondingErrorProneOptions
instance.- Parameters:
args
- command-line arguments- Returns:
- an
ErrorProneOptions
instance encapsulating the given arguments - Throws:
InvalidCommandLineOptionException
- if an error-prone option is invalid
-
processArgs
Given a list of command-line arguments, produce the correspondingErrorProneOptions
instance.- Parameters:
args
- command-line arguments- Returns:
- an
ErrorProneOptions
instance encapsulating the given arguments - Throws:
InvalidCommandLineOptionException
- if an error-prone option is invalid
-