public abstract class RegexpParser extends IssueParser
RegexpDocumentParser or RegexpLineParser.RegexpDocumentParser,
RegexpLineParser,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
protected static String |
ANT_TASK
Pattern identifying an ant task debug output prefix.
|
| Modifier | Constructor and Description |
|---|---|
protected |
RegexpParser(String pattern,
boolean useMultiLine)
Creates a new instance of
RegexpParser. |
| Modifier and Type | Method and Description |
|---|---|
protected IssueBuilder |
configureIssueBuilder(IssueBuilder builder)
Optionally configures the issue builder instance.
|
protected abstract Optional<Issue> |
createIssue(Matcher matcher,
IssueBuilder builder)
Creates a new issue for the specified pattern.
|
protected void |
findIssues(String content,
Report report)
Parses the specified string
content using a regular expression and creates a set of new issues for each
match. |
accepts, isXmlFile, parseprotected static final String ANT_TASK
protected RegexpParser(String pattern, boolean useMultiLine)
RegexpParser.pattern - pattern of compiler warnings.useMultiLine - Enables multi line mode. In multi line mode the expressions ^ and $ match just after or
just before, respectively, a line terminator or the end of the input sequence. By default theseprotected void findIssues(String content, Report report) throws ParsingException, ParsingCanceledException
content using a regular expression and creates a set of new issues for each
match. The new issues are added to the provided set of Report.content - the content to scanreport - the report to add the new issues toParsingException - Signals that during parsing a non recoverable error has been occurredParsingCanceledException - Signals that the parsing has been aborted by the userprotected IssueBuilder configureIssueBuilder(IssueBuilder builder)
builder - the build to configureprotected abstract Optional<Issue> createIssue(Matcher matcher, IssueBuilder builder) throws ParsingException
Optional.empty() to ignore this warning.matcher - the regular expression matcherbuilder - the issue builder to useParsingException - Signals that during parsing a non recoverable error has been occurredCopyright © 2018. All rights reserved.