Checker | Guideline |
---|
| MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers |
| CTR01-CPP. Do not apply the sizeof operator to a pointer when taking the size of an array | DCL01-CPP. Do not reuse variable names in subscopes |
| DCL04-CPP. Do not declare more than one variable per declaration |
| DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic |
| EXP00-CPP. Use parentheses for precedence of operation |
| EXP02-CPP. Be aware of the short-circuit behavior of the logical AND and OR operatorsEXP19-CPP. Do not perform assignments in conditional expressions |
| FIO00-CPP. Take care when creating format strings |
| FIO01-CPP. Be careful using functions that use file names for identification |
| FLP05-CPP. Convert integers to floating point for floating point operations |
| INT07-CPP. Use only explicitly signed or unsigned char type for numeric values |
| INT09-CPP. Ensure enumeration constants map to unique values |
| INT11-CPP. Take care when converting from pointer to integer or integer to pointer |
| INT13-CPP. Use bitwise operators only on unsigned operandsMEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated type |
| MEM11-CPP. Allocate and free memory in the same module, at the same level of abstraction |
| MSC02-CPP. Avoid errors of omission |
| MSC03-CPP. Avoid errors of additionMSC04-CPP. Use comments consistently and in a readable fashion |
| MSC07-CPP. Detect and remove dead code |
| MSC08-CPP. Functions should validate their parameters |
| MSC09-CPP. Character encoding: Use subset of ASCII for safety |
| MSC10-CPP. Character encoding: UTF8-related issuesMSC12-CPP. Detect and remove code that has no effect |
| MSC13-CPP. Detect and remove unused values |
| PRE00-CPP. Avoid defining macros | PRE01-CPP. Use parentheses within macros around parameter names |
| PRE02-CPP. Macro replacement lists should be parenthesized | PRE03-CPP. Prefer typedefs to defines for encoding types | PRE04-CPP. Do not reuse a standard header file name |
| PRE06-CPP. Enclose header files in an inclusion guard |
| PRE07-CPP. Avoid using repeated question marks |
| STR03-CPP. Do not inadvertently truncate a null-terminated character array |
1 Q | EXP50-CPP. Do not depend on the order of evaluation for side effects |
134 S | EXP50-CPP. Do not depend on the order of evaluation for side effects |
35 D | EXP50-CPP. Do not depend on the order of evaluation for side effects |
51 D | MEM50-CPP. Do not access freed memory |
75 D | FIO21-CPP. Do not simultaneously open the same file multiple times |
9 S | EXP50-CPP. Do not depend on the order of evaluation for side effects |
Can detect violations of this recommendation. | MEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated type |
Can detect violations of this recommendation. | MSC04-CPP. Use comments consistently and in a readable fashion |
Can detect violations of this recommendation. | MSC12-CPP. Detect and remove code that has no effect |
Can detect violations of this recommendation. | PRE00-CPP. Avoid defining macros |
Can detect violations of this recommendation. | PRE03-CPP. Prefer typedefs to defines for encoding types |
Can detect violations of this recommendation. | PRE04-CPP. Do not reuse a standard header file name |
Can detect violations of this recommendation??? | EXP19-CPP. Do not perform assignments in conditional expressions |
Implemented | CTR01-CPP. Do not apply the sizeof operator to a pointer when taking the size of an array |