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.info/docs/flags

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 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()
    • isTestOnlyTarget

      public boolean isTestOnlyTarget()
    • 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