Checks for whitespace |
![]() |
NoWhitespaceAfterDescriptionChecks 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 allowLineBreaks to false. Properties
ExamplesTo configure the check:
<module name="NoWhitespaceAfter"/>
To configure the check to forbid linebreaks after a DOT token:
<module name="NoWhitespaceAfter">
<property name="tokens" value="DOT"/>
<property name="allowLineBreaks" value="false"/>
</module>
Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleNoWhitespaceBeforeDescriptionChecks that there is no whitespace before a token. More specifically, it checks that it is not preceded with whitespace, or (if linebreaks are allowed) all characters on the line before are whitespace. To allow linebreaks before a token, set property allowLineBreaks to true. Properties
ExamplesTo configure the check:
<module name="NoWhitespaceBefore"/>
To configure the check to allow linebreaks before a DOT token:
<module name="NoWhitespaceBefore">
<property name="tokens" value="DOT"/>
<property name="allowLineBreaks" value="true"/>
</module>
Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleOperatorWrapDescriptionChecks the policy on how to wrap lines on operators. Properties
ExamplesTo configure the check:
<module name="OperatorWrap"/>
To configure the check for the assignment operator, =, at the end of a line:
<module name="OperatorWrap">
<property name="tokens" value="ASSIGN"/>
<property name="option" value="eol"/>
</module>
Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleParenPadDescriptionChecks the policy on the padding of parentheses; i.e. whether a space is required after a left parenthesis and before a right parenthesis, or such spaces are forbidden. Properties
ExamplesTo configure the check:
<module name="ParenPad"/>
To configure the check to require spaces for the parentheses of constructor, method, and super constructor calls:
<module name="ParenPad">
<property name="tokens" value="CTOR_CALL, METHOD_CALL,
SUPER_CTOR_CALL"/>
<property name="option" value="space"/>
</module>
Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleTabCharacterDescriptionChecks that there are no tab characters ('\t') in the source code. Rationale:
ExampleTo configure the check:
<module name="TabCharacter"/>
Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleWhitespaceAfterDescriptionChecks that a token is followed by whitespace. Properties
ExamplesTo configure the check:
<module name="WhitespaceAfter"/>
To configure the check for whitespace only after COMMA and SEMI tokens:
<module name="WhitespaceAfter">
<property name="tokens" value="COMMA, SEMI"/>
</module>
Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleWhitespaceAroundDescriptionChecks that a token is surrounded by whitespace. Properties
ExamplesTo configure the check:
<module name="WhitespaceAround"/>
To configure the check for whitespace around the assignment operator, =:
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN"/>
</module>
Packagecom.puppycrawl.tools.checkstyle.checks Parent Module |
Copyright © 2002-2003 Oliver Burn. All rights Reserved.