Eclipse Rules

From Maisqual Wiki

Jump to: navigation, search

This page lists rules used in the Eclipse Quality Model.


SQuORE rules

  • No Fallthrough
    • Mnemonic: NOFALLTHROUGH
    • Families: Reliability, Changeability
    • Description: There shall be no fallthrough the next case in a switch statement
  • Default case
    • Mnemonic: DEFAULT
    • Families:
    • Description The final clause of a switch statement shall be the default clause (see [MISRA-C:2004]: RULE 15.3).
  • Label out of a switch
    • Mnemonic: NOLABEL
    • Families: Reliability,
    • 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).
  • Use of continue
    • Mnemonic: NOCONT
    • Families:
    • Description: The 'continue' statement shall not be used (see [MISRA-C:2004]: RULE 14.5).
  • Multiple break
    • Mnemonic: SGLBRK
    • Families:
    • Description: For any iteration statement there shall be at most one 'break' statement used for loop termination (see [MISRA-C:2004]: RULE 14.6).
  • No case in switch
    • Mnemonic: ONECASE
    • Families:
    • Description: Every switch statement shall have at least one case clause (see [MISRA-C:2004]: RULE 15.5).
  • Multiple exits
    • Mnemonic: RETURN
    • Families:
    • Description: A function shall have a single point of exit at the end (see [MISRA-C:2004]: RULE 14.7).
  • No final else
    • Mnemonic: ELSEFINAL
    • Families:
    • Description: All if ... else if constructs shall be terminated with an else clause (see [MISRA-C:2004]: RULE 14.10).
  • Code before first case
    • Mnemonic: NOCODEBEFORECASE
    • Families:
    • Description: There shall be no code before the first case of a switch statement.
  • Assignment without Comparison
    • Mnemonic: NOASGINBOOL
    • Families:
    • Description: Assignment operators shall not be used in expressions that do not contain comparison operators.
  • Missing Break
    • Mnemonic: BRKFINAL
    • Families:
    • Description: An unconditional break statement shall terminate every non-empty switch clause (see [MISRA-C:2004]: RULE 15.2).
  • Assignment in Boolean
    • Mnemonic: NOASGCOND
    • Families:
    • Description: Assignment operators shall not be used in expressions that yield a boolean value
  • No Compound statement
    • Mnemonic: COMPOUND
    • Families:
    • 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).statement shall terminate every non-empty switch clause (see [MISRA-C:2004]: RULE 15.2).
Personal tools