Checks for Blocks

Missing Braces

The property checkstyle.ignore.braces controls whether to ignore checking for missing braces {}'s for the following constructs:

The property type is boolean and defaults to false.

Empty Blocks

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.

left curly brace placement

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.

right curly brace placement

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.