java.lang.Object
edu.hm.hafner.analysis.IssueParser
edu.hm.hafner.analysis.LookaheadParser
edu.hm.hafner.analysis.parser.FoodcriticParser
- All Implemented Interfaces:
Serializable
A parser for Foodcritic warnings.
- Author:
- Rich Schumacher
- See Also:
-
Field Summary
Fields inherited from class edu.hm.hafner.analysis.LookaheadParser
ANT_TASKFields inherited from class edu.hm.hafner.analysis.IssueParser
ADDITIONAL_PROPERTIES, CATEGORY, COLUMN_END, COLUMN_START, DESCRIPTION, FILE_NAME, FINGERPRINT, ID, LINE_END, LINE_RANGE_END, LINE_RANGE_START, LINE_RANGES, LINE_START, MESSAGE, MODULE_NAME, ORIGIN, PACKAGE_NAME, SEVERITY, TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateIssue(Matcher matcher, edu.hm.hafner.util.LookaheadStream lookahead, IssueBuilder builder) Creates a new issue for the specified pattern.Methods inherited from class edu.hm.hafner.analysis.LookaheadParser
isLineInteresting, parse, postProcess, preprocessLineMethods inherited from class edu.hm.hafner.analysis.IssueParser
accepts, equalsIgnoreCase, isXmlFile, parseFile
-
Constructor Details
-
FoodcriticParser
public FoodcriticParser()Creates a new instance ofFoodcriticParser.
-
-
Method Details
-
createIssue
protected Optional<Issue> createIssue(Matcher matcher, edu.hm.hafner.util.LookaheadStream lookahead, IssueBuilder builder) Description copied from class:LookaheadParserCreates a new issue for the specified pattern. This method is called for each matching line in the specified file. If a match is a false positive, then returnOptional.empty()to ignore this warning.- Specified by:
createIssuein classLookaheadParser- Parameters:
matcher- the regular expression matcherlookahead- the lookahead stream to read additional linesbuilder- the issue builder to use- Returns:
- a new annotation for the specified pattern
-