Rule ID | Header |
---|
AUTOSAR-A18_9_2-b | The 'std::move' function should be used to forward rvalue references |
AUTOSAR-A27_0_4-e | Do not use the 'c_str()' and 'data()' functions for string objects |
AUTOSAR-M3_2_4-b | An identifier with external linkage shall have external definition |
BD-PB-LIFETIME | Do not use an object after its lifetime has ended |
BD-PB-NAUNF | Do not read the value of a non-active union field |
CERT_C-MSC14-b | Evaluation of constant unsigned integer expressions in preprocessor directives should not lead to wraparound |
CERT_C-MSC15-b | Evaluation of constant unsigned integer expressions in preprocessor directives should not lead to wraparound |
CODSTA-124_c | Casts shall not be performed between a pointer to a function and any other type |
CODSTA-185_c | The address of the 'localeconv', 'getenv', 'setlocale' or, 'strerror' function should not be taken |
CODSTA-223_c | The names of the standard signed integer types and standard unsigned integer types should not be used |
CODSTA-233 | Types of bit-fields should have defined sizes |
CODSTA-234 | The 'asm' declaration should not be used |
CODSTA-235 | The library functions 'rewind', 'setbuf' and 'ctime' should not be used |
CODSTA-236 | The built-in unary + operator should not be used |
CODSTA-237 | The character handling functions from <cctype> and <cwctype> shall not be used |
CODSTA-238 | The C++ Standard Library functions 'memcpy', 'memmove' and 'memcmp' from <cstring> should not be used |
CODSTA-239 | The literal value zero shall be the only value assigned to errno |
CODSTA-240 | A cast should not convert a pointer type to 'intptr_t' and 'uintptr_t' types |
CODSTA-241 | All 'if...else-if' constructs shall be terminated with an 'else' clause |
CODSTA-242 | The string handling functions from <cstring>, <cstdlib>, <cwchar> and <cinttypes> shall not be used |
CODSTA-243 | The 'switch' statement should not contain labels other than 'case' and 'default' |
CODSTA-304 | A bit-field shall have an appropriate type |
CODSTA-305 | All enumeration values should be representable within the width of the bit-field |
CODSTA-306 | The volatile qualifier shall be used appropriately |
CODSTA-307 | Operands of bitwise and complement operators shall have an unsigned type |
CODSTA-308 | Operands of shift operators shall have an unsigned type |
CODSTA-309 | A conversion from function type to pointer-to-function type shall only occur in appropriate contexts |
CODSTA-310 | Integral promotion and the usual arithmetic conversions shall not change the signedness or the type category of an operand |
CODSTA-311 | The address of an object with automatic storage duration shall not be assigned to an object with a greater lifetime |
CODSTA-312 | Assignment between numeric types shall be appropriate |
CODSTA-313 | The numeric value of an unscoped enumeration with no fixed underlying type shall not be used |
CODSTA-314 | The 'assert' macro shall not be used with a constant expression |
CODSTA-315 | Legacy 'for' statements should be simple |
CODSTA-61_b | The first or the last label of a switch statement should be the 'default' label unless all enumeration values are tested |
CODSTA-63_b | Use bitwise operators only on unsigned operands |
CODSTA-64_b | Every switch branch should be unconditionally terminated |
CODSTA-65_b | An object with enumeration type shall not be converted to an object with pointer type |
CODSTA-67_b | The same type aliases shall be used in all declarations of the same entity |
CODSTA-CPP-110 | Member variable names in derived classes should not be the same as member variable names in base classes |
CODSTA-CPP-111 | The 'NULL' identifier should not be used |
CODSTA-CPP-112 | The result of std::remove, std::remove_if, std::unique and empty shall be used |
CODSTA-CPP-113 | The 'std::locale::global' function should not be used |
CODSTA-CPP-201 | Non-static data members should be either all private or all public |
CODSTA-CPP-202 | An enumeration shall be defined with an explicit underlying type |
CODSTA-CPP-203 | An explicit or implicit enumerator value shall not be the result of a narrowing conversion |
CODSTA-CPP-204 | The operand to typeid shall not be an expression of polymorphic class type |
CODSTA-CPP-205 | User-provided copy and move member functions of a class should have appropriate signatures |
CODSTA-CPP-206 | Member functions returning references to their object should be ref-qualified appropriately |
CODSTA-CPP-207 | An argument passed via ellipsis shall have an appropriate type |
CODSTA-CPP-208 | Exception-unfriendly functions shall be noexcept |
CODSTA-CPP-209 | Functions used as initializers of non-constexpr non-local variables shall be noexcept |
CODSTA-CPP-210 | Parameters in an overriding virtual function shall not specify different default arguments |
CODSTA-CPP-211 | There shall be no conversion from type bool |
CODSTA-CPP-212 | There shall be no conversion to type bool |
CODSTA-CPP-95_b | Do not declare entities in the standard library namespaces: posix, std and stdN |
CODSTA-MCPP-101 | A for-range-initializer shall contain at most one function call |
CODSTA-MCPP-103 | Variables should be captured explicitly in a non-transient lambda |
CODSTA-MCPP-104 | A non-transient lambda shall not implicitly capture this |
CODSTA-MCPP-105 | Special member functions shall be provided appropriately |
CODSTA-MCPP-13_c | The 'std::forward' function should only be used to forward forwarding references |
CODSTA-MCPP-13_d | The 'std::move' function should be used to forward rvalue references |
CODSTA-MCPP-47_b | A class shall only define an initializer-list constructor when it is the only constructor |
CODSTA-MCPP-57 | The raw pointer constructors of 'std::shared_ptr' and 'std::unique_ptr' should not be used |
CODSTA-MCPP-58 | Do not include headers deprecated in the C++17 standard |
CODSTA-MCPP-59 | The 'uncaught_exception' function deprecated in the C++17 standard should not be used |
CODSTA-MCPP-60 | The condition of a 'switch' statement should only be preceded by an optional simple-declaration |
CODSTA-MCPP-61 | Define =delete functions with parameters of type rvalue reference to const |
COMMENT-14_c | Every function declaration should have a proper documentation |
CWE-190-i | Evaluation of constant unsigned integer expressions in preprocessor directives should not lead to wraparound |
EXCEPT-27 | A 'try' statement of a 'try-block' should contain a potentially-throwing statement |
FORMAT-50 | Use parentheses to indicate the precedence of operators in expressions |
GLOBAL-NOEXTERNDEF | An identifier with external linkage shall have external definition |
GLOBAL-PREDICATENOSE | Predicates shall not have persistent side effects |
HICPP-17_3_2-b | The 'std::forward' function should only be used to forward forwarding references |
HICPP-17_3_2-c | The 'std::move' function should be used to forward rvalue references |
INIT-101 | All non-class variables with automatic storage duration should be explicitly initialized |
INIT-19 | All direct, non-static data members of a non-aggregate class should be initialized at the top of a constructor body |
INIT-20 | All direct, non-static data members of an aggregate class should be initialized as soon as the object is created |
JSF-203_b | Evaluation of expressions shall not lead to overflow/underflow |
MISRA-051_b | Evaluation of constant unsigned integer expressions in preprocessor directives should not lead to wraparound |
MISRA-102 | No more than 2 levels of pointer indirection should be used |
MISRA2008-3_2_4_b | An identifier with external linkage shall have exactly one external definition |
MISRA2012-RULE-8_6_b | An identifier with external linkage shall have exactly one external definition |
MISRAC2012-RULE_8_6-b | An identifier with external linkage shall have external definition |
MISRACPP2023-0_0_1-a | There shall be no unreachable code in "else" block |
MISRACPP2023-0_0_1-b | There shall be no unreachable code after 'return', 'break', 'continue', 'goto', 'throw' statements, and after calls to functions with the 'noreturn' attribute |
MISRACPP2023-0_0_1-c | There shall be no unreachable code in "if/else/while/for" block |
MISRACPP2023-0_0_1-d | There shall be no unreachable code in switch statement |
MISRACPP2023-0_0_1-e | There shall be no unreachable code in 'for' loop |
MISRACPP2023-0_0_1-f | There shall be no unreachable code after 'if' or 'switch' statement |
MISRACPP2023-0_0_1-g | There shall be no unreachable code after "if" or "switch" statement inside while/for/do...while loop |
MISRACPP2023-0_0_1-h | Where multiple handlers are provided in a single try-catch statement or function-try-block for a derived class and some or all of its bases, the handlers shall be ordered most-derived to base class |
MISRACPP2023-0_0_1-i | Where multiple handlers are provided in a single 'try-catch' statement or 'function-try-block', any ellipsis (catch-all) handler shall occur last |
MISRACPP2023-0_0_1-j | A 'try' statement of a 'try-block' should contain a potentially-throwing statement |
MISRACPP2023-0_0_2-a | Avoid conditions that always evaluate to the same value |
MISRACPP2023-0_1_1-a | Avoid unused values |
MISRACPP2023-0_1_2-a | The value returned by a function having a non-void return type that is not an overloaded operator shall always be used |
MISRACPP2023-0_2_1-a | Avoid unused local variables |
MISRACPP2023-0_2_1-b | A project should not contain unused variables with internal linkage |
MISRACPP2023-0_2_2-a | Eliminate unused parameters |
MISRACPP2023-0_2_2-b | There shall be no unused named parameters in virtual functions |
MISRACPP2023-0_2_3-a | Types declared in an unnamed namespace scope should be used at least once |
MISRACPP2023-0_2_3-b | Types declared in a block scope should be used at least once |
MISRACPP2023-0_2_4-a | Avoid unreachable methods |
MISRACPP2023-0_3_1-a | Do not use object representations to compare floating-point values |
MISRACPP2023-0_3_1-b | Floating-point expressions shall not be explicitly (syntactically) tested for equality (==) or inequality (!=) |
MISRACPP2023-0_3_1-c | Do not use floating point variables as loop counters |
MISRACPP2023-0_3_1-d | Do not use floating-point expressions which may result in NaN and infinity values |
MISRACPP2023-0_3_2-a | Do not pass incorrect values to library functions |
MISRACPP2023-10_0_1-a | Each variable should be declared in a separate declaration statement |
MISRACPP2023-10_1_1-a | A pointer parameter in a function prototype should be declared as pointer to const if the pointer is not used to modify the addressed object |
MISRACPP2023-10_1_1-b | Declare a type of parameter as typedef to pointer to const if the pointer is not used to modify the addressed object |
MISRACPP2023-10_1_1-c | Declare reference parameters as const references whenever possible |
MISRACPP2023-10_1_2-a | The volatile qualifier shall be used appropriately |
MISRACPP2023-10_2_1-a | An enumeration shall be defined with an explicit underlying type |
MISRACPP2023-10_2_1-b | An explicit or implicit enumerator value shall not be the result of a narrowing conversion |
MISRACPP2023-10_2_2-a | Prefer Scoped Enums to Unscoped Enums |
MISRACPP2023-10_2_3-a | The numeric value of an unscoped enumeration with no fixed underlying type shall not be used |
MISRACPP2023-10_3_1-a | There shall be no unnamed namespaces in header files |
MISRACPP2023-10_4_1-a | The 'asm' declaration should not be used |
MISRACPP2023-11_3_1-a | C-style arrays shall not be used |
MISRACPP2023-11_3_2-a | The declaration of objects should contain no more than 2 levels of pointer indirection |
MISRACPP2023-11_6_1-a | All non-class variables with automatic storage duration should be explicitly initialized |
MISRACPP2023-11_6_2-a | Avoid use before initialization |
MISRACPP2023-11_6_3-a | Within an enumerator list, the value of an implicitly-specified enumeration constant shall be unique |
MISRACPP2023-12_2_1-a | Do not declare member variables as bit-fields |
MISRACPP2023-12_2_2-a | A bit-field shall have an appropriate type |
MISRACPP2023-12_2_2-b | All enumeration values should be representable within the width of the bit-field |
MISRACPP2023-12_2_3-a | Named bit-fields with signed integer type shall have a length of more than one bit |
MISRACPP2023-12_3_1-a | The union keyword should not be used |
MISRACPP2023-13_1_1-a | Classes should not be derived from virtual bases |
MISRACPP2023-13_1_2-a | A base class shall not be both virtual and non-virtual in the same hierarchy |
MISRACPP2023-13_3_1-a | Each overriding virtual function shall be declared with the override or final specifier |
MISRACPP2023-13_3_1-b | Only one of virtual, override or final should be specified in a member function declaration |
MISRACPP2023-13_3_2-a | Parameters in an overriding virtual function shall not specify different default arguments |
MISRACPP2023-13_3_3-a | The identifiers used in the declaration and definition of a function shall be identical |
MISRACPP2023-13_3_3-b | The parameters in all overrides of a function should either be unnamed or have identical names |
MISRACPP2023-13_3_4-a | A pointer to member virtual function shall only be tested for equality with null-pointer-constant |
MISRACPP2023-14_1_1-a | Non-static data members should be either all private or all public |
MISRACPP2023-15_0_1-a | Special member functions shall be provided appropriately |
MISRACPP2023-15_0_1-b | Destructor shall have a non-empty body |
MISRACPP2023-15_0_2-a | User-provided copy and move member functions of a class should have appropriate signatures |
MISRACPP2023-15_1_1-a | Do not use dynamic type of an object under construction |
MISRACPP2023-15_1_1-b | Do not use dynamic type of an object under destruction |
MISRACPP2023-15_1_2-a | All constructors of a class should explicitly call a constructor for all of its immediate base classes and all virtual base classes |
MISRACPP2023-15_1_3-a | Constructors allowing for conversion should be made explicit |
MISRACPP2023-15_1_3-b | User-conversion cast operators should be made explicit |
MISRACPP2023-15_1_4-a | All direct, non-static data members of a non-aggregate class should be initialized at the top of a constructor body |
MISRACPP2023-15_1_4-b | All direct, non-static data members of an aggregate class should be initialized as soon as the object is created |
MISRACPP2023-15_1_5-a | A class shall only define an initializer-list constructor when it is the only constructor |
MISRACPP2023-15_8_1-a | Check for assignment to self in operator= |
MISRACPP2023-16_5_1-a | Avoid overloading logical operators AND, OR (, ||) |
MISRACPP2023-16_5_2-a | The unary & operator shall not be overloaded |
MISRACPP2023-16_6_1-a | If you'd like to support mixed-mode operations make operators a non-member functions |
MISRACPP2023-17_8_1-a | Function templates shall not be explicitly specialized |
MISRACPP2023-18_1_1-a | An exception object should not have pointer type |
MISRACPP2023-18_1_2-a | An empty throw (throw;) shall only be used in the compound-statement of a catch handler |
MISRACPP2023-18_2_2-a | The string handling functions from<cstring>, <cstdlib>, <cwchar> and <cinttypes> shall not be used |
MISRACPP2023-18_3_1-a | There should be at least one exception handler to catch all otherwise unhandled exceptions |
MISRACPP2023-18_3_2-a | A class type exception shall always be caught by reference |
MISRACPP2023-18_3_3-a | Handlers of a function-try-block implementation of a class constructor or destructor shall not reference nonstatic members from this class or its bases |
MISRACPP2023-18_4_1-a | Exception-unfriendly functions shall be noexcept |
MISRACPP2023-18_4_1-b | Functions used as initializers of non-constexpr non-local variables shall be noexcept |
MISRACPP2023-18_5_1-a | Avoid throwing exceptions from functions that are declared not to throw |
MISRACPP2023-18_5_2-a | The 'abort()' function from the 'stdlib.h' or 'cstdlib' library shall not be used |
MISRACPP2023-18_5_2-b | The 'exit()' function from the 'stdlib.h' or 'cstdlib' library shall not be used |
MISRACPP2023-18_5_2-c | The 'quick_exit()' and '_Exit()' functions from the 'stdlib.h' or 'cstdlib' library shall not be used |
MISRACPP2023-19_0_1-a | Preprocessing directives shall be syntactically meaningful even when excluded by the preprocessor |
MISRACPP2023-19_0_2-a | Function-like macros shall not be defined |
MISRACPP2023-19_0_3-a | #include statements in a file should only be preceded by other preprocessor directives or comments |
MISRACPP2023-19_0_4-a | #undef should only be used for macros defined previously in the same file |
MISRACPP2023-19_1_1-a | The defined preprocessor operator shall only be used in one of the two standard forms |
MISRACPP2023-19_1_2-a | All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if or #ifdef directive to which they are related |
MISRACPP2023-19_1_3-a | Do not use in preprocessor directives #if and #elif macros not defined in translation unit |
MISRACPP2023-19_2_1-a | Use multiple include guards |
MISRACPP2023-19_2_2-a | The #include directive shall be followed by either a <filename> or "filename" sequence |
MISRACPP2023-19_2_3-a | Non-standard characters should not occur in header file names in #include directives |
MISRACPP2023-19_3_1-a | The # and ## preprocessor operators should not be used |
MISRACPP2023-19_3_2-a | A macro parameter immediately following a # operator shall not immediately be followed by a ## operator |
MISRACPP2023-19_3_3-a | A macro parameter used as an operand to the # or ## operators, which is itself subject to further macro replacement, shall only be used as an operand to these operators |
MISRACPP2023-19_3_4-a | In the definition of a function-like macro each instance of a parameter shall be enclosed in parentheses unless it is used as the operand of # or ## |
MISRACPP2023-19_3_5-a | Arguments to a function-like macro shall not contain tokens that look like preprocessing directives |
MISRACPP2023-19_6_1-a | The #pragma directive shall not be used |
MISRACPP2023-19_6_1-b | The '_Pragma' operator should not be used |
MISRACPP2023-21_10_1-a | The identifiers va_list, va_arg, va_start, va_end, va_copy should not be used |
MISRACPP2023-21_10_2-a | The facilities provided by <setjmp.h> should not be used |
MISRACPP2023-21_10_2-b | The standard header files <setjmp.h> or <csetjmp> shall not be used |
MISRACPP2023-21_10_3-a | The signal handling facilities of <signal.h> shall not be used |
MISRACPP2023-21_2_1-a | The library functions atof, atoi and atol from library stdlib.h shall not be used |
MISRACPP2023-21_2_3-a | The 'system()' function from the 'stdlib.h' or 'cstdlib' library shall not be used |
MISRACPP2023-21_2_4-a | The macro offsetof, in library stddef.h, shall not be used |
MISRACPP2023-21_6_1-a | Dynamic heap memory allocation shall not be used |
MISRACPP2023-21_6_2-a | Dynamic heap memory allocation shall not be used |
MISRACPP2023-21_6_2-b | Any member function named 'allocate' or 'deallocate' enclosed by namespace 'std' should not be used |
MISRACPP2023-21_6_2-c | The 'std::unique_ptr::release' function should not be used |
MISRACPP2023-21_6_3-a | Destructor should not be called manually |
MISRACPP2023-21_6_3-b | Do not declare the 'new' and 'delete' operators |
MISRACPP2023-21_6_3-c | The memory management functions from the <new> and <memory> headers should not be used |
MISRACPP2023-21_6_3-d | Advanced memory management operators 'new' and 'delete' should not be used |
MISRACPP2023-21_6_4-a | Define both sized and unsized versions of operator delete |
MISRACPP2023-21_6_5-a | Do not delete objects with incomplete class at the point of deletion |
MISRACPP2023-22_3_1-a | The 'assert' macro shall not be used with a constant expression |
MISRACPP2023-22_4_1-a | The literal value zero shall be the only value assigned to errno |
MISRACPP2023-23_11_1-a | The raw pointer constructors of 'std::shared_ptr' and 'std::unique_ptr' should not be used |
MISRACPP2023-24_5_1-a | The character handling functions from <cctype> and <cwctype> shall not be used |
MISRACPP2023-24_5_2-a | The C++ Standard Library functions 'memcpy', 'memmove' and 'memcmp' from <cstring> should not be used |
MISRACPP2023-25_5_1-a | The 'setlocale' function should not be used |
MISRACPP2023-25_5_1-b | The 'std::locale::global' function should not be used |
MISRACPP2023-25_5_2-a | The pointers returned by the Standard Library functions 'localeconv', 'getenv', 'setlocale' or, 'strerror' shall only be used as if they have pointer to const-qualified type |
MISRACPP2023-25_5_2-b | Strings pointed by members of the structure 'lconv' should not be modified |
MISRACPP2023-25_5_2-c | The address of the 'localeconv', 'getenv', 'setlocale' or, 'strerror' function should not be taken |
MISRACPP2023-25_5_3-a | Pointers returned by certain Standard Library functions should not be used following a subsequent call to the same or related function |
MISRACPP2023-26_3_1-a | Avoid using vectorboo |
MISRACPP2023-28_3_1-a | Predicates shall not have persistent side effects |
MISRACPP2023-28_6_1-a | Do not use std::move on objects declared with the const or consttype |
MISRACPP2023-28_6_2-a | The 'std::forward' function should be used to forward forwarding references |
MISRACPP2023-28_6_2-b | The 'std::forward' function should only be used to forward forwarding references |
MISRACPP2023-28_6_3-a | Do not subsequently use the argument to std::forward |
MISRACPP2023-28_6_3-b | Do not rely on the value of a moved-from object |
MISRACPP2023-28_6_4-a | The result of std::remove, std::remove_if, std::unique and empty shall be used |
MISRACPP2023-30_0_1-a | The input/output library stdio.h shall not be used |
MISRACPP2023-30_0_1-b | Prefer iostream.h to stdio.h |
MISRACPP2023-30_0_2-a | Do not alternately input and output from a stream without an intervening flush or positioning call |
MISRACPP2023-4_1_2-a | Do not include headers deprecated in the C++17 standard |
MISRACPP2023-4_1_2-b | The 'uncaught_exception' function deprecated in the C++17 standard should not be used |
MISRACPP2023-4_1_2-c | Do not use throw exception specifications |
MISRACPP2023-4_1_2-d | A constexpr static data member should not be declared outside the class definition |
MISRACPP2023-4_1_3-a | Avoid incorrect shift operations |
MISRACPP2023-4_1_3-b | Avoid signed integer overflows |
MISRACPP2023-4_1_3-c | Avoid null pointer dereferencing |
MISRACPP2023-4_1_3-d | Avoid division by zero |
MISRACPP2023-4_6_1-a | The value of an expression shall be the same under any order of evaluation that the standard permits |
MISRACPP2023-4_6_1-b | Don't write code that depends on the order of evaluation of function arguments |
MISRACPP2023-4_6_1-c | Don't write code that depends on the order of evaluation of function designator and function arguments |
MISRACPP2023-4_6_1-d | Don't write code that depends on the order of evaluation of expression that involves a function call |
MISRACPP2023-4_6_1-e | Between sequence points an object shall have its stored value modified at most once by the evaluation of an expression |
MISRACPP2023-4_6_1-f | Do not use more than one volatile between two adjacent sequence points |
MISRACPP2023-4_6_1-g | Don't write code that depends on the order of evaluation of function calls |
MISRACPP2023-5_0_1-a | Trigraphs shall not be used |
MISRACPP2023-5_10_1-a | Do not declare entities in the standard library namespaces: posix, std and stdN |
MISRACPP2023-5_10_1-b | Do not use identifiers which begin with one or two underscores ('_' or '__') |
MISRACPP2023-5_10_1-c | An identifier shall not contain a double underscore '__' |
MISRACPP2023-5_10_1-d | User defined suffixes of the user defined literal operators shall start with underscore followed by one or more letters |
MISRACPP2023-5_10_1-e | A user-defined literal suffix should be directly preceded by a literal operator |
MISRACPP2023-5_10_1-f | A macro identifier should have an appropriate form |
MISRACPP2023-5_10_1-g | Do not declare identifiers with names reserved in the standard library |
MISRACPP2023-5_13_1-a | Only those escape sequences that are defined in ISO/IEC 14882:2014 shall be used |
MISRACPP2023-5_13_2-a | Octal and hexadecimal escape sequences shall be terminated |
MISRACPP2023-5_13_3-a | Octal constants (other than zero) shall not be used |
MISRACPP2023-5_13_4-a | A 'U' suffix shall be applied to all constants of unsigned type |
MISRACPP2023-5_13_5-a | Use capital 'L' instead of lowercase 'l' to indicate long |
MISRACPP2023-5_13_6-a | An integer-literal of type long long shall not use a single 'L' or 'l' in any suffix |
MISRACPP2023-5_13_7-a | String literals with different encoding prefixes shall not be concatenated |
MISRACPP2023-5_13_7-b | String literals with and without encoding prefixes should not be concatenated |
MISRACPP2023-5_7_1-a | The character sequence /* shall not be used within a C-style comment |
MISRACPP2023-5_7_2-a | Sections of code should not be "commented out" |
MISRACPP2023-5_7_3-a | Line-splicing shall not be used in // comments |
MISRACPP2023-6_0_1-a | Always declare functions at file scope |
MISRACPP2023-6_0_1-b | Parameter names in function declarations should not be enclosed in parentheses |
MISRACPP2023-6_0_1-c | Local variable names in variable declarations should not be enclosed in parentheses |
MISRACPP2023-6_0_2-a | When an array is declared with external linkage, its size shall be stated explicitly or defined implicitly by initialisation |
MISRACPP2023-6_0_3-a | The global namespace shall only contain main() and namespace declarations |
MISRACPP2023-6_0_4-a | The identifier main shall not be used for a function other than the global function main |
MISRACPP2023-6_2_1-a | The One Definition Rule shall not be violated |
MISRACPP2023-6_2_2-a | All declarations of an object or function shall have compatible types |
MISRACPP2023-6_2_2-b | If a function is declared with an exception-specification, then all declarations of the same function (in other translation units) shall be declared with the same set of type-ids |
MISRACPP2023-6_2_3-a | An identifier with external linkage shall have no more then one external definition |
MISRACPP2023-6_2_3-b | A type that is used in multiple translation units shall be defined in one and only one file |
MISRACPP2023-6_2_3-c | An inline function that is used in multiple translation units shall be defined in one and only one file |
MISRACPP2023-6_2_3-d | Template specialization shall be declared in the same file as the primary template or a user-defined type, for which the specialization is declared |
MISRACPP2023-6_2_4-a | Don't define entities with linkage in a header file |
MISRACPP2023-6_4_1-a | Identifier declared in a local or function prototype scope shall not hide an identifier declared in a global or namespace scope |
MISRACPP2023-6_4_1-b | Identifiers declared in an inner local scope should not hide identifiers declared in an outer local scope |
MISRACPP2023-6_4_1-c | Identifiers declared in a local scope should not hide identifiers declared in a class scope |
MISRACPP2023-6_4_1-d | Identifiers declared in a class scope should not hide identifiers declared in a global or namespace scope |
MISRACPP2023-6_4_1-e | Identifiers declared in an inner class scope should not hide identifiers declared in outer class scope |
MISRACPP2023-6_4_1-f | Member variable names in derived classes should not be the same as member variable names in base classes |
MISRACPP2023-6_4_2-a | Never redefine an inherited nonvirtual function |
MISRACPP2023-6_4_2-b | Member functions declared in derived class should not hide functions declared in base classes |
MISRACPP2023-6_4_3-a | In a class template with a dependent base, any name that may be found in that dependent base shall be referred to using a qualified-id or this |
MISRACPP2023-6_5_1-a | Objects or functions with external linkage shall be declared in a header file |
MISRACPP2023-6_5_2-a | Do not use static keyword except inside functions and classes |
MISRACPP2023-6_5_2-b | Identifiers shall not simultaneously have both internal and external linkage in the same translation unit |
MISRACPP2023-6_7_1-a | Local variables shall not have static storage duration |
MISRACPP2023-6_7_2-a | Avoid unencapsulated global variables (including variables declared in namespaces and public static members) |
MISRACPP2023-6_8_1-a | Do not point to a wrapped object that has been freed |
MISRACPP2023-6_8_1-b | Do not read the value of a non-active union field |
MISRACPP2023-6_8_1-c | Do not use an object after its lifetime has ended |
MISRACPP2023-6_8_2-a | The address of an object with automatic storage shall not be returned from a function |
MISRACPP2023-6_8_2-b | Never return lambdas that capture local objects by reference |
MISRACPP2023-6_8_3-a | The address of an object with automatic storage duration shall not be assigned to an object with a greater lifetime |
MISRACPP2023-6_8_4-a | Member functions returning references to their object should be ref-qualified appropriately |
MISRACPP2023-6_9_1-a | The same type aliases shall be used in all declarations of the same entity |
MISRACPP2023-6_9_2-a | The names of the standard signed integer types and standard unsigned integer types should not be used |
MISRACPP2023-7_0_1-a | There shall be no conversion from type bool |
MISRACPP2023-7_0_2-a | There shall be no conversion to type bool |
MISRACPP2023-7_0_3-a | The plain char type shall be used only for the storage and use of character values |
MISRACPP2023-7_0_3-b | signed and unsigned char type shall be used only for the storage and use of numeric values |
MISRACPP2023-7_0_4-a | Operands of bitwise and complement operators shall have an unsigned type |
MISRACPP2023-7_0_4-b | Operands of shift operators shall have an unsigned type |
MISRACPP2023-7_0_5-a | Integral promotion and the usual arithmetic conversions shall not change the signedness or the type category of an operand |
MISRACPP2023-7_0_6-a | Assignment between numeric types shall be appropriate |
MISRACPP2023-7_11_1-a | Prefer 'nullptr' over 'NULL' or '0'(zero) |
MISRACPP2023-7_11_1-b | The 'NULL' identifier should not be used |
MISRACPP2023-7_11_2-a | Do not pass an expression with array type to a function with a pointer or array type parameter |
MISRACPP2023-7_11_3-a | A conversion from function type to pointer-to-function type shall only occur in appropriate contexts |
MISRACPP2023-8_0_1-a | The operand of the 'sizeof' operator should be enclosed in parentheses |
MISRACPP2023-8_0_1-b | Use parentheses to indicate the precedence of operators in expressions |
MISRACPP2023-8_14_1-a | The right-hand operand of a unary && or || operator shall not contain side effects |
MISRACPP2023-8_18_1-a | An object shall not be assigned or copied to an overlapping object |
MISRACPP2023-8_18_1-b | An object shall not be assigned to an overlapping object |
MISRACPP2023-8_18_1-c | An object shall not be assigned to an overlapping object |
MISRACPP2023-8_18_2-a | The result of a built-in assignment operator should not be used |
MISRACPP2023-8_19_1-a | The comma operator shall not be used |
MISRACPP2023-8_1_1-a | A non-transient lambda shall not implicitly capture this |
MISRACPP2023-8_1_2-a | Variables should be captured explicitly in a non-transient lambda |
MISRACPP2023-8_20_1-a | Evaluation of constant unsigned integer expressions should not lead to wrap-around |
MISRACPP2023-8_20_1-b | Evaluation of constant unsigned integer expressions in preprocessor directives should not lead to wraparound |
MISRACPP2023-8_2_1-a | A pointer to a virtual base class shall only be cast to a pointer to a derived class by means of dynamic_cast |
MISRACPP2023-8_2_10-a | Do not use recursion |
MISRACPP2023-8_2_11-a | An argument passed via ellipsis shall have an appropriate type |
MISRACPP2023-8_2_2-a | C-style casts (other than void casts) and functional notation casts (other than explicit constructor calls) shall not be used |
MISRACPP2023-8_2_3-a | A cast shall not remove any 'const' or 'volatile' qualification from the type of a pointer or reference |
MISRACPP2023-8_2_4-a | Casts shall not be performed between a pointer to a function and any other type |
MISRACPP2023-8_2_5-a | Avoid using reinterpret_cast |
MISRACPP2023-8_2_6-a | An object with integer type or pointer to void type shall not be converted to an object with pointer type |
MISRACPP2023-8_2_6-b | An object with enumeration type shall not be converted to an object with pointer type |
MISRACPP2023-8_2_7-a | A cast should not convert a pointer type to an integral type |
MISRACPP2023-8_2_7-b | A cast should not convert a pointer type to 'intptr_t' and 'uintptr_t' types |
MISRACPP2023-8_2_8-a | A cast should not convert a pointer type to an integral type |
MISRACPP2023-8_2_9-a | The operand to typeid shall not be an expression of polymorphic class type |
MISRACPP2023-8_3_1-a | The unary minus operator shall not be applied to an expression whose underlying type is unsigned |
MISRACPP2023-8_3_2-a | The built-in unary + operator should not be used |
MISRACPP2023-8_7_1-a | Avoid accessing arrays out of bounds |
MISRACPP2023-8_7_1-b | A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same array |
MISRACPP2023-8_7_1-c | Avoid overflow when reading from a buffer |
MISRACPP2023-8_7_1-d | Avoid overflow when writing to a buffer |
MISRACPP2023-8_7_1-e | Avoid overflow due to reading a not zero terminated string |
MISRACPP2023-8_7_2-a | Do not subtract two pointers that do not address elements of the same array |
MISRACPP2023-8_9_1-a | Do not compare two unrelated pointers |
MISRACPP2023-9_2_1-a | Expression statements shall not be explicit calls to constructors of temporary objects only |
MISRACPP2023-9_3_1-a | The statement forming the body of a 'switch', 'while', 'do...while' or 'for' statement shall be a compound statement |
MISRACPP2023-9_3_1-b | 'if' and 'else' should be followed by a compound statement |
MISRACPP2023-9_4_1-a | All 'if...else-if' constructs shall be terminated with an 'else' clause |
MISRACPP2023-9_4_2-a | The first or the last label of a switch statement should be the 'default' label unless all enumeration values are tested |
MISRACPP2023-9_4_2-b | Every switch branch should be unconditionally terminated |
MISRACPP2023-9_4_2-c | A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statement |
MISRACPP2023-9_4_2-d | A switch statement shall only contain switch labels and switch clauses, and no other code |
MISRACPP2023-9_4_2-e | Every switch statement shall have at least two switch-clauses |
MISRACPP2023-9_4_2-f | The 'switch' statement should not contain labels other than 'case' and 'default' |
MISRACPP2023-9_4_2-g | The condition of a 'switch' statement should only be preceded by an optional simple-declaration |
MISRACPP2023-9_5_1-a | Legacy 'for' statements should be simple |
MISRACPP2023-9_5_2-a | A for-range-initializer shall contain at most one function call |
MISRACPP2023-9_6_1-a | The goto statement shall not be used |
MISRACPP2023-9_6_2-a | Any label referenced by a goto statement shall be declared in the same block, or in a block enclosing the goto statement |
MISRACPP2023-9_6_3-a | The goto statement shall jump to a label declared later in the same function body |
MISRACPP2023-9_6_4-a | Never return from functions that should not return |
MISRACPP2023-9_6_5-a | All exit paths from a function, except main(), with non-void return type shall have an explicit return statement with an expression |
MRM-59 | Do not declare the 'new' and 'delete' operators |
MRM-60 | The memory management functions from the <new> and <memory> headers should not be used |
MRM-61 | Advanced memory management operators 'new' and 'delete' should not be used |
MRM-62_a | Any member function named 'allocate' or 'deallocate' enclosed by namespace 'std' should not be used |
MRM-62_b | The 'std::unique_ptr::release' function should not be used |
NAMING-33_b | An identifier shall not contain a double underscore '__' |
NAMING-51_b | A user-defined literal suffix should be directly preceded by a literal operator |
NAMING-55 | A macro identifier should have an appropriate form |
NAMING-56 | Do not declare identifiers with names reserved in the standard library |
NAMING-57 | The parameters in all overrides of a function should either be unnamed or have identical names |
OPT-44 | A constexpr static data member should not be declared outside the class definition |
OPT-45 | Non-const objects with internal linkage should be defined at function scope if they are only accessed from within a single function |
OPT-46 | Types declared in an unnamed namespace scope should be used at least once |
OPT-47 | Types declared in a block scope should be used at least once |
OPT-48 | Destructor shall have a non-empty body |
PB-38_c | String literals with and without encoding prefixes should not be concatenated |
PB-73_b | Evaluation of constant unsigned integer expressions in preprocessor directives should not lead to wraparound |
PORT-38 | An integer-literal of type long long shall not use a single 'L' or 'l' in any suffix |
PREPROC-23_b | The '_Pragma' operator should not be used |
PREPROC-25_b | #undef should only be used for macros defined previously in the same file |
PREPROC-28 | Function-like macros shall not be defined |
SECURITY-54 | Do not use the 'c_str()' and 'data()' functions for string objects |
TEMPL-09_b | Function templates shall not be explicitly specialized |