Name | Checked | Synopsis |
---|
CFL#001
|
 |
Statements following a case label shall be terminated by a statement that exits the switch statement |
CFL#002
|
 |
All switch statements shall have a default label as the last case label |
CFL#003
|
 |
An else sub-statement of an if statement shall not be an if statement without an else part |
CFL#004
|
 |
Do not use goto |
CFL#005
|
 |
Do not access a modified object more than once in an expression |
CFL#006
|
 |
Do not apply sizeof to an expression with side-effects |
CFL#007
|
 |
Do not change a loop variable inside a for loop block |
CFL#008
|
 |
Always use inclusive lower limits and exclusive upper limits |
CFL#009
|
 |
Never use continue in a nested loop |
CFL#010
|
 |
Never use break to exit a loop |
CFL#011
|
 |
The test condition in control statements shall be a non-assignment expression |
CFL#012
|
|
Update loop variables close to where the loop condition is specified |
CFL#013
|
 |
All flow control primitives (if, else, while, for, do, switch) shall be followed by a block, even if it is empty |
CFL#014
|
 |
Do not return from unexpected locations |
CFL#015
|
 |
The definition of a void function shall not end with a return statement |
CFL#016
|
 |
Do not have overly complex functions |
CFL#017
|
 |
Do not make explicit comparisons to true or false |
CFL#018
|
 |
Use range-based for loops instead of iterators |
CFL#019
|
 |
Use explicit parentheses when using multiple different operators in an expression |
CFL#020
|
 |
Control should not reach the end of a non-void function without returning a value |
CFL#021
|
 |
Use prefix instead of postfix versions of ++ and -- operators for non-simple types |
CFL#022
|
 |
Apply sizeof to an object rather than to its type |
CFL#023
|
|
Do not use selection statements (if, switch) instead of a simple assignment or initialization |
CFL#024
|
 |
A statement must have a side-effect, i.e., it must do something. |