public abstract class SonarQubeParser extends IssueParser
| Constructor and Description |
|---|
SonarQubeParser() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
accepts(org.json.JSONObject object)
Returns whether this parser accepts the specified JSON object as valid input.
|
boolean |
accepts(ReaderFactory readerFactory)
Returns whether this parser accepts the specified file as valid input.
|
boolean |
filterIssue(org.json.JSONObject issue)
Decides whether or not to parse and add an issue.
|
protected abstract String |
getModulePath(org.json.JSONObject component,
org.json.JSONObject issue)
Extracts the module path from the specified JSON objects.
|
Report |
parse(ReaderFactory readerFactory)
Parses the specified file for issues.
|
protected String |
parseModulePath(org.json.JSONObject moduleKeyObject,
String componentKey)
Find the module path inside the corresponding component.
|
isXmlFilepublic boolean accepts(ReaderFactory readerFactory)
IssueParseraccepts in class IssueParserreaderFactory - provides a reader to the reportstrue if this parser accepts this file as valid input, or false if the file could not be
parsed by this parserprotected abstract boolean accepts(org.json.JSONObject object)
object - the JSON object to analysetrue if this parser accepts this object as valid input, false otherwisepublic Report parse(ReaderFactory readerFactory) throws ParsingException
IssueParserparse in class IssueParserreaderFactory - provides a reader to the reportsParsingException - Signals that during parsing a non recoverable error has been occurredpublic boolean filterIssue(org.json.JSONObject issue)
issue - the issue to filter.true if the issue is to be parsed and added, otherwise falseprotected abstract String getModulePath(org.json.JSONObject component, org.json.JSONObject issue)
component - the componentissue - the issueCopyright © 2018. All rights reserved.