Checks for blocks |
![]() |
EmptyBlockDescriptionChecks for empty blocks. Properties
ExamplesTo 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> Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleLeftCurlyDescriptionChecks for the placement of left curly braces ('{') for code blocks. The policy to verify is specified using property option. Policies eol and nlow take into account property maxLineLength. Properties
ExamplesTo configure the check: <module name="LeftCurly"/> To configure the check to apply the nl policy to type blocks: <module name="LeftCurly"> <property name="option" value="nl"/> <property name="tokens" value="CLASS_DEF,INTERFACE_DEF"/> </module> Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleNeedBracesDescriptionChecks for braces around code blocks. Properties
ExamplesTo 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> Packagecom.puppycrawl.tools.checkstyle.checks Parent ModuleRightCurlyDescriptionChecks the placement of right curly braces ('}') for else, try, and catch tokens. The policy to verify is specified using property option. Properties
ExamplesTo 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> Packagecom.puppycrawl.tools.checkstyle.checks Parent Module |
Copyright © 2002 Oliver Burn. All rights Reserved.