public class CommentedOutCodeLineCheck extends JavaAstVisitor
| Constructor and Description |
|---|
CommentedOutCodeLineCheck() |
| Modifier and Type | Method and Description |
|---|---|
List<Integer> |
getWantedTokens() |
void |
leaveFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
Detects commented-out code in remaining candidates.
|
void |
visitFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
Creates candidates for commented-out code - all comment blocks.
|
void |
visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
Removes documentation comments and JSNI comments from candidates for commented-out code in order to prevent false-positives.
|
addSourceCode, getFileContents, getInputFile, leaveToken, peekParentClass, peekParentPackage, peekSourceCode, popSourceCode, setFileContents, setInputFile, setSource, setSourceCodeStackpublic CommentedOutCodeLineCheck()
public List<Integer> getWantedTokens()
getWantedTokens in class JavaAstVisitorpublic void visitFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
visitFile in class JavaAstVisitorpublic void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
visitToken in class JavaAstVisitorpublic void leaveFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
leaveFile in class JavaAstVisitorCopyright © 2009-2012 SonarSource. All Rights Reserved.