public abstract class SonarQubeParser extends AbstractParser
DEPRECATION, PROPRIETARY_API| 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(Path file,
Charset charset)
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(Reader reader,
Function<String,String> preProcessor)
Parses the specified input stream for issues.
|
protected String |
parseModulePath(org.json.JSONObject moduleKeyObject,
String componentKey)
Find the module path inside the corresponding component.
|
getFileName, guessCategory, guessCategoryIfEmpty, parse, parse, parseIntisXmlFile, parsepublic boolean accepts(Path file, Charset charset)
IssueParseraccepts in class IssueParserfile - the file to parsecharset - the encoding to use when reading filestrue 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(Reader reader, Function<String,String> preProcessor) throws ParsingCanceledException, ParsingException
AbstractParserparse in class AbstractParserreader - the reader to get the text frompreProcessor - pre processes each input line before handing it to the actual parserParsingCanceledException - Signals that the parsing has been aborted by the userParsingException - 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.