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)
  • Method Details

    • isSupportedOption

      public static int isSupportedOption(String option)
    • isEnableAllChecksAsWarnings

      public boolean isEnableAllChecksAsWarnings()
    • isDisableAllChecks

      public boolean isDisableAllChecks()
    • getRemainingArgs

      public com.google.common.collect.ImmutableList<String> getRemainingArgs()
    • getSeverityMap

      public com.google.common.collect.ImmutableMap<String,ErrorProneOptions.Severity> getSeverityMap()
    • ignoreUnknownChecks

      public boolean ignoreUnknownChecks()
    • disableWarningsInGeneratedCode

      public boolean disableWarningsInGeneratedCode()
    • isDisableAllWarnings

      public boolean isDisableAllWarnings()
    • isDropErrorsToWarnings

      public boolean isDropErrorsToWarnings()
    • isSuggestionsAsWarnings

      public boolean isSuggestionsAsWarnings()
    • isTestOnlyTarget

      public boolean isTestOnlyTarget()
    • isPubliclyVisibleTarget

      public boolean isPubliclyVisibleTarget()
    • isIgnoreSuppressionAnnotations

      public boolean isIgnoreSuppressionAnnotations()
    • ignoreLargeCodeGenerators

      public boolean ignoreLargeCodeGenerators()
    • getFlags

      public ErrorProneFlags getFlags()
    • patchingOptions

      public com.google.errorprone.ErrorProneOptions.PatchingOptions patchingOptions()
    • getExcludedPattern

      public Pattern getExcludedPattern()
    • empty

      public static ErrorProneOptions empty()
    • processArgs

      public static ErrorProneOptions processArgs(Iterable<String> args)
      Given a list of command-line arguments, produce the corresponding ErrorProneOptions instance.
      Parameters:
      args - command-line arguments
      Returns:
      an ErrorProneOptions instance encapsulating the given arguments
      Throws:
      InvalidCommandLineOptionException - if an error-prone option is invalid
    • processArgs

      public static ErrorProneOptions processArgs(String[] args)
      Given a list of command-line arguments, produce the corresponding ErrorProneOptions instance.
      Parameters:
      args - command-line arguments
      Returns:
      an ErrorProneOptions instance encapsulating the given arguments
      Throws:
      InvalidCommandLineOptionException - if an error-prone option is invalid