C-Style Rule Set

Use of continue

Mnemonic: NOCONT

Description: The 'continue' statement shall not be used (see [MISRA-C:2004]: RULE 14.5).

Artefact Type: FUNCTION

Default Value: 0

Multiple break

Mnemonic: SGLBRK

Description: For any iteration statement there shall be at most one 'break' statement used for loop termination (see [MISRA-C:2004]: RULE 14.6).

Artefact Type: FUNCTION

Default Value: 0

Multiple exits

Mnemonic: RETURN

Description: A function shall have a single point of exit at the end (see [MISRA-C:2004]: RULE 14.7).

Artefact Type: FUNCTION

Default Value: 0

No Compound statement

Mnemonic: COMPOUND

Description: The statement forming the body of a switch, while, do ... while or for statement shall be a compound statement (see [MISRA-C:2004]: RULES 14.8 and 14.9).

Artefact Type: FUNCTION

Default Value: 0

Label out a switch

Mnemonic: NOLABEL

Description: A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement (see [MISRA-C:2004]: RULE 15.1).

Artefact Type: FUNCTION

Default Value: 0

Missing Break

Mnemonic: BRKFINAL

Description: An unconditional break statement shall terminate every non-empty switch clause (see [MISRA-C:2004]: RULE 15.2).

Artefact Type: FUNCTION

Default Value: 0

No final else

Mnemonic: ELSEFINAL

Description: All if ... else if constructs shall be terminated with an else clause (see [MISRA-C:2004]: RULE 14.10).

Artefact Type: FUNCTION

Default Value: 0

Missing Default

Mnemonic: DEFAULT

Description: The final clause of a switch statement shall be the default clause (see [MISRA-C:2004]: RULE 15.3).

Artefact Type: FUNCTION

Default Value: 0

No case in switch

Mnemonic: ONECASE

Description: Every switch statement shall have at least one case clause (see [MISRA-C:2004]: RULE 15.5).

Artefact Type: FUNCTION

Default Value: 0

Fallthrough

Mnemonic: NOFALLTHROUGH

Description: There shall be no fallthrough the next case in a switch statement.

Artefact Type: FUNCTION

Default Value: 0

Assignment in Boolean

Mnemonic: NOASGCOND

Description: Assignment operators shall not be used in expressions that yield a boolean value

Artefact Type: FUNCTION

Default Value: 0

Assignment without Comparison

Mnemonic: NOASGINBOOL

Description: Assignment operators shall not be used in expressions that do not contain comparison operators.

Artefact Type: FUNCTION

Default Value: 0

Use of goto

Mnemonic: NOGOTO

Description: The 'goto' statement shall not be used (see [MISRA-C:2004]: RULE 14.4).

Artefact Type: FUNCTION

Default Value: 0

Backward goto

Mnemonic: BWGOTO

Description: Backward gotos shall not be used.

Artefact Type: FUNCTION

Default Value: 0

Code before first case

Mnemonic: NOCODEBEFORECASE

Description: There shall be a no code before the first case of a switch statement.

Artefact Type: FUNCTION

Default Value: 0

Risky Empty Statement

Mnemonic: RISKYEMPTY

Description: Risky Empty Statement

Artefact Type: FUNCTION

Default Value: 0