Class GrepParser.Descriptor

All Implemented Interfaces:
Saveable, Loadable, OnMaster
Enclosing class:
GrepParser

@Symbol("grepParser") @Extension public static class GrepParser.Descriptor extends Tool.ToolDescriptor
Descriptor for this static analysis tool.
  • Constructor Details

    • Descriptor

      public Descriptor()
      Creates the descriptor instance.
  • Method Details

    • getDisplayName

      @NonNull public String getDisplayName()
      Overrides:
      getDisplayName in class Descriptor<Tool>
    • getLabelProvider

      public StaticAnalysisLabelProvider getLabelProvider()
      Description copied from class: Tool.ToolDescriptor
      Returns a StaticAnalysisLabelProvider that will render all tool specific labels.
      Overrides:
      getLabelProvider in class Tool.ToolDescriptor
      Returns:
      a tool specific StaticAnalysisLabelProvider
    • doCheckIncludePattern

      @POST public FormValidation doCheckIncludePattern(@AncestorInPath AbstractProject<?,?> project, @QueryParameter String includePattern)
      Performs on-the-fly validation on the ant pattern for included files.
      Parameters:
      project - the project that is configured
      includePattern - the file pattern
      Returns:
      the validation result
    • doCheckExcludePattern

      @POST public FormValidation doCheckExcludePattern(@AncestorInPath AbstractProject<?,?> project, @QueryParameter String excludePattern)
      Performs on-the-fly validation on the ant pattern for excluded files.
      Parameters:
      project - the project that is configured
      excludePattern - the file pattern
      Returns:
      the validation result
    • doCheckRegexp

      @POST public FormValidation doCheckRegexp(@AncestorInPath BuildableItem project, @QueryParameter String regexp)
      Performs on-the-fly validation on the regular expression.
      Parameters:
      project - the project that is configured
      regexp - the regular expression to validate
      Returns:
      the validation result
    • doFillSeverityItems

      @POST public ListBoxModel doFillSeverityItems()
      Returns the available severity levels for the drop-down in the UI.
      Returns:
      a list-box model with all predefined severity options
    • doCheckExample

      @POST public FormValidation doCheckExample(@AncestorInPath BuildableItem project, @QueryParameter String example, @QueryParameter String regexp, @QueryParameter String severity, @QueryParameter String message)
      Validates the example text against the configured regexp (live preview in the UI). The message template is also applied so that captured groups can be verified.
      Parameters:
      project - the project that is configured
      example - example text to scan
      regexp - the regular expression to match
      severity - the severity to assign to matches
      message - the optional message template; when blank the matched line is used as-is
      Returns:
      validation result