Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated Identifiers section to add list of suffixes and examples of identifiers, like in C++.

...

The three-letter mnemonic can be used to group similar coding practices and to indicate which category a coding practice belongs to.

The numeric value is used to give each coding practice a unique identifier. Numeric values in the range of 00 to 29 are reserved for recommendations, and values in the range of 30 to 99 are reserved for rules. (The values used for the SEI CERT C++ Coding Standard are different.) Rules and recommendations are frequently referenced from the rules in this standard by their identifier and title.

Here are some example identifiers with an explanation of each:

  • INT50-CPP Do not cast to an out-of-range enumeration value
    • This identifier indicates a rule
    • “INT” stands for the Integer category
    • “50” is the unique identifier
    • “-CPP” stands for the C++ language
  • EXP00-J Do not ignore values returned by methods
    • This identifier indicates a rule
    • “EXP” stands for the Expressions category
    • “00” is the unique identifier
    • “-J” stands for the Java language
  •  FLP00-C. Understand the limitations of floating-point numbers
    • This identifier indicates a recommendation
    • “FLP” stands for the Floating Point category
    • “00” is the unique identifier
    • “-C” stands for the C programming language

Noncompliant Code Examples and Compliant Solutions

...