Checks for whitespace |
![]() |
EmptyForIteratorPadDescriptionChecks the padding of an empty for iterator; that is whether white space is required at an empty for iterator, or such white space is forbidden. No check occurs if there is a line wrap at the iterator, as in for (Iterator foo = very.long.line.iterator(); foo.hasNext(); ) Properties
ExamplesTo configure the check: <module name="EmptyForIteratorPad"/> To configure the check to require white space at an empty for iterator: <module name="EmptyForIteratorPad"> <property name="option" value="space"/> </module> Packagecom.puppycrawl.tools.checkstyle.checks.whitespace Parent ModuleNoWhitespaceAfterDescriptionChecks 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.whitespace 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.whitespace 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.whitespace 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.whitespace Parent ModuleTypecastParenPadDescriptionChecks the policy on the padding of parentheses for typecasts. That is, 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="TypecastParenPad"/> To configure the check to require spaces: <module name="TypecastParenPad"> <property name="option" value="space"/> </module> Packagecom.puppycrawl.tools.checkstyle.checks.whitespace 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.whitespace 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.whitespace 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.whitespace Parent Module |
Copyright © 2002-2003 Oliver Burn. All rights Reserved.