Skip to content

Files

Latest commit

 

History

History
33 lines (19 loc) · 1.17 KB

NoWhitespaceAfter.md

File metadata and controls

33 lines (19 loc) · 1.17 KB

Pattern: Whitespace after token

Issue: -

Description

Checks that there is no whitespace after a token. More specifically, it checks that it is not followed by whitespace, or (if line breaks are allowed) all characters on the line after are whitespace. To forbid line breaks after a token, set property allowLineBreaks to false.

The check processes ARRAY_DECLARATOR and INDEX_OP tokens specially from other tokens. Actually it is checked that there is no whitespace before this tokens, not after them.

Examples

To configure the check:

<module name="NoWhitespaceAfter"/>

To configure the check to forbid line breaks after a DOT token:

<module name="NoWhitespaceAfter">
    <property name="tokens" value="DOT"/>
    <property name="allowLineBreaks" value="false"/>
</module>

Further Reading