com.puppycrawl.tools.checkstyle.checks.coding
public class IllegalTokenTextCheck extends GenericIllegalRegexpCheck
Checks for illegal token text.
An example of how to configure the check to forbid String literals
containing "a href" is:
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL"/>
<property name="format" value="a href"/>
</module>
An example of how to configure the check to forbid leading zeros in an integer literal, other than zero and a hex literal is:
<module name="IllegalTokenText">
<property name="tokens" value="NUM_INT,NUM_LONG"/>
<property name="format" value="^0[^lx]"/>
<property name="ignoreCase" value="true"/>
</module>
| Method Summary | |
|---|---|
| void | beginTree(DetailAST aRootAST) |
| int[] | getAcceptableTokens() |
| void | visitToken(DetailAST aAST) |