You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 32 Next »

Generated Content

This page is automatically generated from the "Automated Detection" sections in the individual guidelines. Do not modify this page directly.

Version number:
1.2

Checker

Guideline

CC2.EXP30EXP50-CPP. Do not depend on the order of evaluation for side effects
CC2.MSC30MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
CP1.ARR02CTR02-CPP. Explicitly specify array bounds, even if implicitly defined by an initializer
CP1.DCL00DCL00-CPP. Const-qualify immutable objects
CP1.DCL01DCL01-CPP. Do not reuse variable names in subscopes
CP1.DCL02DCL02-CPP. Use visually distinct identifiers
CP1.DCL03DCL03-CPP. Use a static assertion to test the value of a constant expression
CP1.DCL04DCL04-CPP. Do not declare more than one variable per declaration
CP1.DCL06DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
CP1.DCL07DCL07-CPP. Minimize the scope of variables and methods
CP1.DCL13DCL13-CPP. Declare function parameters that are pointers to values not changed by the function as const
CP1.DCL15DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
CP1.DCL16DCL16-CPP. Use "L," not "l," to indicate a long value
CP1.ERR01ERR01-CPP. Use ferror() rather than errno to check for FILE stream errors
CP1.ERR36ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
CP1.EXP00EXP00-CPP. Use parentheses for precedence of operation
CP1.EXP05EXP05-CPP. Do not use C-style casts
CP1.EXP09EXP09-CPP. Use sizeof to determine the size of a type or variable
CP1.EXP12EXP12-CPP. Do not ignore values returned by functions or methods
CP1.EXP14EXP14-CPP. Do not use reinterpret_cast on pointers to class objects with multiple inheritence
CP1.EXP15EXP15-CPP. Beware of integer promotion when performing bitwise operations on chars or shorts
CP1.EXP17EXP17-CPP. Treat relational and equality operators as if they were nonassociative
CP1.EXP19EXP19-CPP. Do not perform assignments in conditional expressions
CP1.FIO07FIO07-CPP. Prefer fseek() to rewind()
CP1.FIO12FIO12-CPP. Prefer setvbuf() to setbuf()
CP1.INT02INT02-CPP. Understand integer conversion rules
CP1.INT07INT07-CPP. Use only explicitly signed or unsigned char type for numeric values
CP1.INT09INT09-CPP. Ensure enumeration constants map to unique values
CP1.INT12INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression
CP1.INT13INT13-CPP. Use bitwise operators only on unsigned operands
CP1.MEM02MEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
CP1.MSC04MSC04-CPP. Use comments consistently and in a readable fashion
CP1.MSC05MSC05-CPP. Do not manipulate time_t typed values directly
CP1.MSC12MSC12-CPP. Detect and remove code that has no effect
CP1.MSC18MSC18-CPP. Finish every set of statements associated with a case label with a break statement
CP1.MSC20MSC20-CPP. Do not use a switch statement to transfer control into a complex block
CP1.MSC22MSC19-CPP. Do not define static private members
CP1.PRE00PRE00-CPP. Avoid defining macros
CP1.PRE01PRE01-CPP. Use parentheses within macros around parameter names
CP1.PRE02PRE02-CPP. Macro replacement lists should be parenthesized
CP1.PRE03PRE03-CPP. Prefer typedefs to defines for encoding types
CP1.PRE04PRE04-CPP. Do not reuse a standard header file name
CP1.PRE06PRE06-CPP. Enclose header files in an inclusion guard
CP1.PRE07PRE07-CPP. Avoid using repeated question marks
CP1.PRE08PRE08-CPP. Guarantee that header file names are unique
CP1.PRE12PRE10-CPP. Do not define unsafe macros
CP1.STR04STR04-CPP. Use plain char for characters in the basic character set
CP1.STR36STR08-CPP. Do not specify the bound of a character array initialized with a string literal

>

  • No labels