com.puppycrawl.tools.checkstyle.checks.blocks
public class NeedBracesCheck extends Check
Checks for braces around code blocks.
By default the check will check the following blocks:
LITERAL_DO,
LITERAL_ELSE,
LITERAL_FOR,
LITERAL_IF,
LITERAL_WHILE.
An example of how to configure the check is:
<module name="NeedBraces"/>
An example of how to configure the check for if and
else blocks is:
<module name="NeedBraces">
<property name="tokens" value="LITERAL_IF, LITERAL_ELSE"/>
</module>
Version: 1.0
| Method Summary | |
|---|---|
| int[] | getDefaultTokens() |
| void | visitToken(DetailAST aAST) |