diff --git a/docs/config_blocks.html b/docs/config_blocks.html index 81b291de0..65dfc2aef 100644 --- a/docs/config_blocks.html +++ b/docs/config_blocks.html @@ -1,89 +1,275 @@ - - + + +
-Checks for blocks |
+ ![]() |
+
+
|
+
+ EmptyBlock+Description++ Checks for empty blocks. + +Properties+
Missing Braces+Examples++ To configure the check: + ++<module name="EmptyBlock"/> ++ + To configure the check for the text policy and only + catch blocks: + ++<module name="EmptyBlock"> + <property name="option" value="text"/> + <property name="tokens" value="LITERAL_CATCH"/> +</module> ++ Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ TreeWalker + +LeftCurly ChecksDescription++ There are three checks for the placement of left curly braces (' + {') for code blocks: + +
+ All left curly brace checks have a policy to verify that is specified using + property option. Policies eol and + nlow take into account property maxLineLength. + +Properties other than tokens+
The property checkstyle.ignore.braces controls -whether to ignore checking for missing braces {}'s -for the following constructs: +Examples++ To configure the OtherLeftCurly check: + ++<module name="OtherLeftCurly"/> ++ + To configure the MethodLeftCurly check for the nl policy and maximum + line length 120: + ++<module name="MethodLeftCurly"> + <property name="option" value="nl"/> + <property name="maxLineLength" value="120"/> +</module> ++ Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ TreeWalker + +NeedBracesDescription++ Checks for braces around code blocks. + +Properties+
Examples++ To configure the check: + ++<module name="NeedBraces"/> ++ + To configure the check for if and + else blocks: + ++<module name="NeedBraces"> + <property name="tokens" value="LITERAL_IF, LITERAL_ELSE"/> +</module> ++ Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ TreeWalker + +RightCurlyDescription++ Checks the placement of right curly braces ('}') for + else, try, and catch + tokens. The policy to verify is specified using property + option. + +Properties+
The property type is boolean and -defaults to false. +Examples++ To configure the check: + ++<module name="RightCurly"/> ++ + To configure the check with policy alone for + else tokens: + ++<module name="RightCurly"> + <property name="option" value="alone"/> + <property name="tokens" value="LITERAL_ELSE"/> +</module> ++ Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ TreeWalker + + |
+
The property checkstyle.block.try specifies the -policy on how to check try blocks. The property type -is block policy and defaults to -stmt.
- -The property checkstyle.block.catch specifies the -policy on how to check catch blocks. The property type -is block policy and defaults to -text.
- -The property checkstyle.block.finally specifies the -policy on how to check finally blocks. The property -type is block policy and defaults to -stmt.
- - -Checkstyle enforces the correct placement of left curly braces -'{'.
- -The property checkstyle.lcurly.type specifies the -policy to check the placement of the left curly brace for -class and interface blocks. -The property type is -left curly brace policy and defaults -to eol.
- -The property checkstyle.lcurly.method specifies the -policy to check the placement of the left curly brace for method blocks. -The property type is -left curly brace policy and defaults -to eol.
- -The property checkstyle.lcurly.other specifies -the policy to check the placement of the left curly brace for all other -blocks. This includes switch, -while, for, -do, if, -else, synchronized, -try, catch, -finally and static blocks. -The property type is -left curly brace policy and defaults -to eol.
- - -The property checkstyle.rcurly specifies the -policy to check the placement of the right curly braces -'}' for blocks. -The property type is -right curly brace policy and defaults -to same.
- -Copyright © 2002 Oliver Burn. All rights Reserved.
++Copyright © 2002 Oliver Burn. All rights Reserved. +
\ No newline at end of file diff --git a/docs/config_modifiers.html b/docs/config_modifiers.html index 699ec4e34..8420f8189 100644 --- a/docs/config_modifiers.html +++ b/docs/config_modifiers.html @@ -185,7 +185,7 @@ Language specification, section 9.4).
<module name="VisibilityModifier">
- <property name="publicMemberPattern" value="^$;"/>
+ <property name="publicMemberPattern" value="^$"/>
</module>