public abstract class RegexpParser extends AbstractParser
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.
|
protected static Issue |
FALSE_POSITIVE
Used to define a false positive warnings that should be excluded after the regular expression scan.
|
DEPRECATION, PROPRIETARY_API| Modifier | Constructor and Description |
|---|---|
protected |
RegexpParser(String pattern,
boolean useMultiLine)
Creates a new instance of
RegexpParser. |
| Modifier and Type | Method and Description |
|---|---|
protected abstract 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. |
getFileName, guessCategory, guessCategoryIfEmpty, parse, parse, parse, parseIntaccepts, isXmlFile, parseprotected static final Issue FALSE_POSITIVE
protected 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 abstract Issue createIssue(Matcher matcher, IssueBuilder builder) throws ParsingException
FALSE_POSITIVE 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.