The sections below include the coding conventions with respect to statements.
- Avoid enclosing the condition with parentheses.
- Keep the
else ifkeywords in the same line with the matching
else ifblock's closing brace separated only by a single space.
- Do not have any empty
else if, or
- If empty, add an empty line between the opening and closing braces.
Match patterns clause
- Block indent each pattern clause in its own line.
- Keep a single space before and after the
- If a pattern clause has more than one statement, block indent each statement in its own line.
If the pattern body is empty, then keep it as an empty block.