com.puppycrawl.tools.checkstyle.meta.checks.whitespace.NoWhitespaceAfterCheck.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checkstyle Show documentation
Show all versions of checkstyle Show documentation
Checkstyle is a development tool to help programmers write Java code
that adheres to a coding standard
<?xml version="1.0" encoding="UTF-8"?> <checkstyle-metadata> <module> <check fully-qualified-name="com.puppycrawl.tools.checkstyle.checks.whitespace.NoWhitespaceAfterCheck" name="NoWhitespaceAfter" parent="com.puppycrawl.tools.checkstyle.TreeWalker"> <description><p> Checks that there is no whitespace after a token. More specifically, it checks that it is not followed by whitespace, or (if linebreaks are allowed) all characters on the line after are whitespace. To forbid linebreaks after a token, set property {@code allowLineBreaks} to {@code false}. </p> <p> The check processes <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_DECLARATOR"> ARRAY_DECLARATOR</a> and <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INDEX_OP"> INDEX_OP</a> tokens specially from other tokens. Actually it is checked that there is no whitespace before this tokens, not after them. Space after the <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ANNOTATIONS"> ANNOTATIONS</a> before <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#ARRAY_DECLARATOR"> ARRAY_DECLARATOR</a> and <a href="https://checkstyle.org/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INDEX_OP"> INDEX_OP</a> will be ignored. </p></description> <properties> <property default-value="true" name="allowLineBreaks" type="boolean"> <description>Control whether whitespace is allowed if the token is at a linebreak.</description> </property> <property default-value="ARRAY_INIT,AT,INC,DEC,UNARY_MINUS,UNARY_PLUS,BNOT,LNOT,DOT,ARRAY_DECLARATOR,INDEX_OP" name="tokens" type="java.lang.String[]" validation-type="tokenSet"> <description>tokens to check</description> </property> </properties> <message-keys> <message-key key="ws.followed"/> </message-keys> </check> </module> </checkstyle-metadata>