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, setSourceCodeStack
public CommentedOutCodeLineCheck()
public List<Integer> getWantedTokens()
getWantedTokens
in class JavaAstVisitor
public void visitFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
visitFile
in class JavaAstVisitor
public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
visitToken
in class JavaAstVisitor
public void leaveFile(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
leaveFile
in class JavaAstVisitor
Copyright © 2009-2012 SonarSource. All Rights Reserved.