com.puppycrawl.tools.checkstyle.checks.blocks
public class RightCurlyCheck extends AbstractOptionCheck
Checks the placement of right curly braces. The policy to verify is specified using the RightCurlyOption class and defaults to SAME.
By default the check will check the following tokens:
LITERAL_TRY.
LITERAL_CATCH,
LITERAL_FINALLY.
LITERAL_IF,
LITERAL_ELSE,
An example of how to configure the check is:
<module name="RightCurly"/>
An example of how to configure the check with policy
ALONE for else tokens is:
<module name="RightCurly">
<property name="tokens" value="LITERAL_ELSE"/>
<property name="option" value="alone"/>
</module>
Version: 2.0
| Constructor Summary | |
|---|---|
| RightCurlyCheck()
Sets the right curly option to same. | |
| Method Summary | |
|---|---|
| int[] | getDefaultTokens() |
| void | setShouldStartLine(boolean aFlag)
Does the check need to check if rcurly starts line. |
| void | visitToken(DetailAST aAST) |
Parameters: aFlag new value of this property.