Class ParserDescriptor

java.lang.Object
edu.hm.hafner.analysis.registry.ParserDescriptor
Direct Known Subclasses:
CodeGeneratorDescriptor, DryDescriptor, EmbeddedEngineerDescriptor, FindBugsDescriptor, GrypeDescriptor, OwaspDependencyCheckDescriptor, PnpmAuditDescriptor, PolyspaceDescriptor, RevApiDescriptor, SimulinkCheckDescriptor

public abstract class ParserDescriptor extends Object
Interface to describe all descriptors.
Author:
Lorenz Munsch
  • Method Details

    • getId

      public String getId()
      Returns the technical ID of the parser.
      Returns:
      the technical id of the parser
    • getName

      public String getName()
      Returns a human-readable name of the parser. Note that this property is not yet localizable.
      Returns:
      the human-readable name
    • createParser

      public abstract IssueParser createParser(ParserDescriptor.Option... options)
      Creates a new IssueParser instance.
      Parameters:
      options - options to configure the parser - may customize the new parser instance (if supported by the selected tool)
      Returns:
      the parser
    • getPattern

      public String getPattern()
      Returns the default filename pattern for this tool. Override if your parser typically works on a specific file. This pattern will be interpreted as an ANT pattern or glob, resp.
      Returns:
      the default pattern
    • getHelp

      public String getHelp()
      Returns an optional help text that can provide useful hints on how to configure the static analysis tool so that the report files could be parsed by Jenkins. This help can be a plain text message or an HTML snippet.
      Returns:
      the help
    • hasHelp

      public final boolean hasHelp()
      Returns whether an optional help text is available for this parser.
      Returns:
      true if there is a help text available
      See Also:
    • getUrl

      public String getUrl()
      Returns an optional URL to the homepage of the static analysis tool.
      Returns:
      the help
    • hasUrl

      public final boolean hasUrl()
      Returns whether the URL for the parser is set.
      Returns:
      true if there is a URL available
      See Also:
    • getIconUrl

      public String getIconUrl()
      Returns an optional URL to the icon or logo of the static analysis tool.
      Returns:
      the help
    • getDescription

      public String getDescription(Issue issue)
      Returns a detailed description of the specified issue. If there is no additional description is available, then an empty String is returned.
      Parameters:
      issue - the issue to get the description for
      Returns:
      the description