public abstract class UnwantedExpressionInCommentCheckBase extends CommentCheckBase
context| Constructor and Description |
|---|
UnwantedExpressionInCommentCheckBase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract java.lang.String |
getFindingText(IToken token,
java.util.regex.MatchResult matchResult)
Gets the text for the finding.
|
protected abstract java.util.regex.Pattern |
getUnwantedRegex()
Provides the Regex pattern that specifies which expressions are unwanted
in comments.
|
void |
initialize()
Initializes the custom check.
|
protected void |
processComment(IToken token,
int startLine,
int endLine)
When implemented in a subclass, processes the specified comment token, which
runs from the provided start line to the provided end line.
|
executecreateFinding, createFinding, createFinding, createFinding, createFinding, createFinding, createFinding, createFindingForSiblingEntities, createFindingForSiblings, createFindingOnFirstLine, createFindingOnUnfilteredCode, createFindingOnUnfilteredCode, createFindingOnUnfilteredCode, createInstance, createSelectionPattern, getCodeViewOption, isCpp, select, select, selectUnfilteredPreProcessed, setContextpublic UnwantedExpressionInCommentCheckBase()
public void initialize() throws CheckException
initialize in class CheckImplementationBaseCheckException - can be thrown by subclassesprotected void processComment(IToken token, int startLine, int endLine) throws CheckException
processComment in class CommentCheckBasetoken - the comment token to processstartLine - the 1-based start line of the comment token in the analyzed
resource.endLine - the 1-based end line of the comment token in the analyzed
resource.CheckExceptionprotected abstract java.util.regex.Pattern getUnwantedRegex()
protected abstract java.lang.String getFindingText(IToken token, java.util.regex.MatchResult matchResult)
token - The token where the unwanted pattern was found.matchResult - The MatchResult which allows providing more details in
the findings text.