Class OTDockerLintParser

All Implemented Interfaces:
Serializable

public class OTDockerLintParser extends JsonIssueParser
A parser for ot-docker-linter json output.
Author:
Abhishek Dubey
See Also:
  • Constructor Details

    • OTDockerLintParser

      public OTDockerLintParser()
  • Method Details

    • accepts

      public boolean accepts(ReaderFactory readerFactory)
      Description copied from class: IssueParser
      Returns whether this parser accepts the specified file as valid input. Parsers may reject a file if it is in the wrong format to avoid exceptions during parsing.
      Overrides:
      accepts in class JsonIssueParser
      Parameters:
      readerFactory - provides a reader to the reports
      Returns:
      true if this parser accepts this file as valid input, or false if the file could not be parsed by this parser
    • parseJsonArray

      protected void parseJsonArray(Report report, org.json.JSONArray jsonReport, IssueBuilder issueBuilder)
      Description copied from class: JsonIssueParser
      Parses the specified JSON object and populates the provided report with all issues.
      Overrides:
      parseJsonArray in class JsonIssueParser
      Parameters:
      report - the report to fill
      jsonReport - the input JSON report given as JSON array
      issueBuilder - build to be used to create issues
    • parseJsonObject

      protected void parseJsonObject(Report report, org.json.JSONObject jsonIssue, IssueBuilder issueBuilder)
      Description copied from class: JsonIssueParser
      Parses the specified JSON object and populates the provided report with all issues.
      Overrides:
      parseJsonObject in class JsonIssueParser
      Parameters:
      report - the report to fill
      jsonIssue - the input JSON report given as JSON object
      issueBuilder - build to be used to create issues