Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: removed C-specific rule/rec designations

Contents

Table of Contents

Introduction

This coding standard consists of rules and recommendations, collectively referred to as guidelines. Rules are meant to provide normative requirements for code, whereas recommendations are meant to provide guidance that, when followed, should improve the safety, reliability, and security of software systems. However, a violation of a recommendation does not necessarily indicate the presence of a defect in the code.

...

Each rule and recommendation is given a unique identifier. These identifiers consist of three parts:

  • a three-letter mnemonic representing the section of the standardprefix that represents the topic the rule/recommendation belongs to
  • a two-digit numeric value in the range of 00-99
  • a suffix that represents the associated language or platform

Supported Languages and Platforms

...

See the table below for a summary of supported languages and platforms:

Suffix

Language/Platform

-C

C

-CPP

C++

-J

Java

-PL

Perl

Examples

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 recommendation

“INT” stands for the Integer category

“50” is the unique identifier

“-CPP” stands for the C++ language

...

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

The numeric value is used to give each coding practice a unique identifier. Numeric values in the range of 00-29 are reserved for recommendations, while values in the range of 30-99 are reserved for rules.


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

        Scope      Introduction      Development Process