public abstract class AbstractViolationAdapter extends AbstractParser
ViolationsParser instances. Converts the results of a ViolationsParser into a static
analysis Report.DEPRECATION, PROPRIETARY_API| Constructor and Description |
|---|
AbstractViolationAdapter() |
| Modifier and Type | Method and Description |
|---|---|
protected Severity |
convertSeverity(se.bjurr.violations.lib.model.SEVERITY severity,
se.bjurr.violations.lib.model.Violation violation)
Computes the
Severity from the specified SEVERITY. |
protected abstract se.bjurr.violations.lib.parsers.ViolationsParser |
createParser()
Creates a new parser instance.
|
protected void |
extractAdditionalProperties(IssueBuilder builder,
se.bjurr.violations.lib.model.Violation violation)
Sub-classes may add additional
IssueBuilder properties based on the content of the specified Violation. |
protected boolean |
isValid(se.bjurr.violations.lib.model.Violation violation)
Returns whether this violation is valid and should be converted to an
Issue. |
Report |
parse(Reader reader,
Function<String,String> preProcessor)
Parses the specified input stream for issues.
|
getFileName, guessCategory, guessCategoryIfEmpty, parse, parse, parseIntparsepublic 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 occurredprotected abstract se.bjurr.violations.lib.parsers.ViolationsParser createParser()
ViolationsParser instanceprotected boolean isValid(se.bjurr.violations.lib.model.Violation violation)
Issue. Return false if the
specified violation is a false positive or should not be counted.violation - the violation to checktrue if the violation is valid, false otherwiseprotected void extractAdditionalProperties(IssueBuilder builder, se.bjurr.violations.lib.model.Violation violation)
IssueBuilder properties based on the content of the specified Violation. This default implementation is empty.builder - the issue builder to changeviolation - the violation instanceprotected Severity convertSeverity(se.bjurr.violations.lib.model.SEVERITY severity, se.bjurr.violations.lib.model.Violation violation)
Severity from the specified SEVERITY. Sub-classes may override and use any of the
properties of the provided violation.severity - the severityviolation - the violation instanceSeverityCopyright © 2018. All rights reserved.