scitools.com

← CodeCheck catalog

AUTOSAR is a coding standard you can enforce automatically with CodeCheck, Understand's static-analysis engine — in the GUI, from the command line, or in CI.

AUTOSAR

The AUTOSAR coding standard was created by an alliance of hundreds of automotive manufacturers, developers, and suppliers.

Formerly called "Guidelines for the use of the C++14 language in critical and safety-related systems", the standards consists of nearly 400 requirements that industry experts agree will mitigate bugs, remove inconsistencies and clarify C++ code.

All RulesAdvisoryRequired
Understand % Coverage91%94%91%
Understand Coverage36333330
Total Rules39935364

Checks

Check IDCheck NameSupportedAutomationCategory
A0-1-1A project shall not contain instances of non-volatile variables being given values that are not subsequently usedYesAutomatedRequired
A0-1-2The value returned by a function shall be usedYesAutomatedRequired
A0-1-3Every function defined in an anonymous namespace, or static function with internal linkage, or private member function shall be usedYesAutomatedRequired
A0-1-4There shall be no unused named parameters in non-virtual functionsYesAutomatedRequired
A0-1-5There shall be no unused named parameters in the set of parameters for a virtual function and all the functions that override itYesAutomatedRequired
A0-1-6There should be no unused type declarationsYesAutomatedAdvisory
A0-4-1Floating-point implementation shall comply with IEEE 754 standardNoNon-automatedRequired
A0-4-2Type long double shall not be usedYesAutomatedRequired
A0-4-3The implementations in the chosen compiler shall strictly comply with the C++14 Language StandardNoAutomatedRequired
A0-4-4Range, domain and pole errors shall be checked when using math functionsNoNon-automatedRequired
A1-1-1All code shall conform to ISO/IEC 14882:2014 - Programming Language C++ and shall not use deprecated featuresNoAutomatedRequired
A1-1-2A warning level of the compilation process shall be set in compliance with project policiesNoNon-automatedRequired
A1-1-3An optimization option that disregards strict standard compliance shall not be turned on in the chosen compilerNoNon-automatedRequired
A1-2-1When using a compiler toolchain, in safety-related software, the tool confidence level (TCL) shall be determinedNoNon-automatedRequired
A1-4-1Code metrics and their valid boundaries shall be defined and code shall comply with defined boundaries of code metricsNoNon-automatedRequired
A1-4-3All code should compile free of compiler warningsYesAutomatedAdvisory
A2-3-1Only those characters specified in the C++ Language Standard basic source character set shall be used in the source codeYesAutomatedRequired
A2-5-12-3-1 Trigraphs shall not be usedYesAutomatedRequired
A2-5-2Digraphs shall not be usedYesAutomatedRequired
A2-7-1The character \ shall not occur as a last character of a C++ commentYesAutomatedRequired
A2-7-2Sections of code shall not be "commented out"YesNon-automatedRequired
A2-7-3All declarations of "user-defined" types, static and non-static data members, functions and methods shall be preceded by documentationYesAutomatedRequired
A2-7-5Comments shall not document any actions or sources (e.g. tables, figures, paragraphs, etc.) that are outside of the fileNoNon-automatedRequired
A2-8-1A header file name should reflect the logical entity for which it provides declarationsYesNon-automatedRequired
A2-8-2An implementation file name should reflect the logical entity for which it provides definitionsYesNon-automatedAdvisory
A2-10-1Shadowed IdentifiersYesAutomatedRequired
A2-10-4The identifier name of a non-member object with static storage duration or static function shall not be reused within a namespaceYesAutomatedRequired
A2-10-5An identifier name of a function with static storage duration or a non-member object with external or internal linkage should not be reusedYesAutomatedAdvisory
A2-10-6A class or enumeration name shall not be hidden by a variable, function or enumerator declaration in the same scopeYesAutomatedRequired
A2-11-1Volatile keyword shall not be usedYesAutomatedRequired
A2-13-1Only those escape sequences that are defined in ISO/IEC 14882:2014 shall be usedYesAutomatedRequired
A2-13-2Concatenating String Literals of Different EncodingsYesAutomatedRequired
A2-13-3Type wchar_t shall not be usedYesAutomatedRequired
A2-13-4String literals shall not be assigned to non-constant pointersYesAutomatedRequired
A2-13-5Hexadecimal constants should be upper caseYesAutomatedAdvisory
A2-13-6Universal character names shall be used only inside character or string literalsYesAutomatedRequired
A3-1-1It shall be possible to include any header file in multiple translation units without violating the One Definition RuleYesAutomatedRequired
A3-1-2Header files, that are defined locally in the project, shall have a file name extension of one of: ".h", ".hpp" or ".hxx"YesAutomatedRequired
A3-1-3Implementation files, that are defined locally in the project, should have a file name extension of ".cpp"YesAutomatedAdvisory
A3-1-4When an array with external linkage is declared, its size shall be stated explicitlyYesAutomatedRequired
A3-1-5A function definition shall only be placed in a class definition if (1) the function is intended to be inlined (2) it is a member function template (3) it is a member function of a class templateYesPartially AutomatedRequired
A3-1-6Trivial accessor and mutator functions should be inlined.YesAutomatedAdvisory
A3-3-1Objects or functions with external linkage (including members of named namespaces) shall be declared in a header fileYesAutomatedRequired
A3-3-2Static and thread-local objects shall be constant-initializedYesAutomatedRequired
A3-8-1An object shall not be accessed outside of its lifetimeNoAutomatedRequired
A3-9-1Fixed Width IntegersYesAutomatedRequired
A4-5-1Expressions with type enum or enum class shall not be used as operands to built-in and overloaded operators other than the subscript operator [ ], the assignment operator =, the equality operators == and ! =, the unary & operator, and the relational operators <, <=, >, >=YesAutomatedRequired
A4-7-1An integer expression shall not lead to data loss.YesAutomatedRequired
A4-10-1Only nullptr literal shall be used as the null-pointer-constantYesAutomatedRequired
A5-0-1The value of an expression shall be the same under any order of evaluation that the standard permitsYesAutomatedRequired
A5-0-2Condition of if statement shall be boolYesAutomatedRequired
A5-0-3No more than 2 levels of pointer indirectionYesAutomatedRequired
A5-0-4Pointer arithmetic shall not be used with pointers to non-final classesYesAutomatedRequired
A5-1-1Literal values shall not be used apart from type initialization, otherwise symbolic names shall be used insteadYesAutomatedRequired
A5-1-2Variables shall not be implicitly captured in a lambda expressionYesAutomatedRequired
A5-1-3Parameter list (possibly empty) shall be included in every lambda expressionYesAutomatedRequired
A5-1-4A lambda expression object shall not outlive any of its reference-captured objectsYesAutomatedRequired
A5-1-6Specify Lambda Return TypeYesAutomatedAdvisory
A5-1-7A lambda shall not be an operand to decltype or typeidYesAutomatedRequired
A5-1-8Lambda expressions should not be defined inside another lambda expressionYesAutomatedAdvisory
A5-1-9Identical unnamed lambda expressions shall be replaced with a named function or a named lambda expressionYesAutomatedAdvisory
A5-2-1dynamic_cast should not be usedYesAutomatedAdvisory
A5-2-2Traditional C-style casts shall not be usedYesAutomatedRequired
A5-2-3A cast shall not remove any const or volatile qualification from the type of a pointer or referenceYesAutomatedRequired
A5-2-4reinterpret_cast shall not be usedYesAutomatedRequired
A5-2-5AAn array or container shall not be accessed beyond its range (Part A)YesAutomatedRequired
A5-2-5BAn array or container shall not be accessed beyond its range Part BYesAutomatedRequired
A5-2-6Operands of Logical Boolean OperatorsYesAutomatedRequired
A5-3-1Evaluation of the operand to the typeid operator shall not contain side effects.YesNon-automatedRequired
A5-3-2Before dereferencing a pointer, compare it with NULLYesPartially AutomatedRequired
A5-3-3Deleting Pointers to Incomplete Class TypesYesAutomatedRequired
A5-5-1A pointer to member shall not access non-existent class membersYesAutomatedRequired
A5-6-1AThe right hand operand of the integer division or remainder operators shall not be equal to zeroYesAutomatedRequired
A5-6-1BThe right hand operand of the integer division or remainder operators shall not be equal to zeroYesAutomatedRequired
A5-10-1A pointer to member virtual function shall only be tested for equality with null-pointer-constantYesAutomatedRequired
A5-16-1The ternary conditional operator shall not be used as a sub-expressionYesAutomatedRequired
A6-2-1Move and copy assignment operators shall either move or respectively copy base classes and data members of a class, without any side effectsYesAutomatedRequired
A6-2-2Explicit Calls to Constructors of Temporary ObjectsYesAutomatedRequired
A6-4-1A switch statement shall have at least two case-clauses, distinct from the default labelYesAutomatedRequired
A6-5-1A for-loop that loops through all elements of the container and does not use its loop-counter shall not be usedYesAutomatedRequired
A6-5-2A for loop shall contain a single loop-counter which shall not have floating-point typeYesAutomatedRequired
A6-5-3Do statements should not be usedYesAutomatedAdvisory
A6-5-4For-init-statement and expression should not perform actions other than loop-counter initialization and modificationYesAutomatedAdvisory
A6-6-1The goto statement shall not be used.YesAutomatedRequired
A7-1-1Constexpr or const specifiers shall be used for immutable data declarationYesAutomatedRequired
A7-1-2The constexpr specifier shall be used for values that can be determined at compile timeYesAutomatedRequired
A7-1-3CV-qualifiers shall be placed on the right hand side of the type that is a typedef or a using nameYesAutomatedRequired
A7-1-4The register keyword shall not be usedYesAutomatedRequired
A7-1-5The auto specifier shall not be used apart from following cases: (1) to declare that a variable has the same type as return type of a function call, (2) to declare that a variable has the same type as initializer of non-fundamental type, (3) to declare parameters of a generic lambda expression, (4) to declare a function template using trailing return type syntaxYesAutomatedRequired
A7-1-6The typedef specifier shall not be usedYesAutomatedRequired
A7-1-7Each expression statement and identifier declaration shall be placed on a separate lineYesAutomatedRequired
A7-1-8A non-type specifier shall be placed before a type specifier in a declaration.YesAutomatedRequired
A7-1-9A class, structure, or enumeration shall not be declared in the definition of its typeYesAutomatedRequired
A7-2-1An expression with enum underlying type shall only have values corresponding to the enumerators of the enumerationYesAutomatedRequired
A7-2-2Enumeration underlying base type shall be explicitly definedYesAutomatedRequired
A7-2-3Enumerations shall be declared as scoped enum classesYesAutomatedRequired
A7-2-4In an enumeration, either (1) none, (2) the first or (3) all enumerators shall be initializedYesAutomatedRequired
A7-2-5Enumerations should be used to represent sets of related named constantsNoNon-automatedAdvisory
A7-3-1Overloaded Function Not Visible From Where it is CalledYesAutomatedRequired
A7-4-1The asm declaration shall not be used.YesAutomatedRequired
A7-5-1A function shall not return a reference or a pointer to a parameter that is passed by reference to const.YesAutomatedRequired
A7-5-2Functions shall not call themselves, either directly or indirectly.YesAutomatedRequired
A7-6-1Functions declared with the [[noreturn]] attribute shall not returnYesAutomatedRequired
A8-2-1When declaring function templates, the trailing return type syntax shall be used if the return type depends on the type of parameters.YesAutomatedRequired
A8-4-1Functions shall not be defined using the ellipsis notation.YesAutomatedRequired
A8-4-2Always return a value in non-void functionsYesAutomatedRequired
A8-4-3Common ways of passing parameters should be used.YesAutomatedRequired
A8-4-4Multiple output values from a function should be returned as a struct or tuple.YesAutomatedAdvisory
A8-4-5"consume" parameters declared as X && shall always be moved from.YesAutomatedRequired
A8-4-6"forward" parameters declared as T && shall always be forwarded.YesAutomatedRequired
A8-4-7"in" parameters for "cheap to copy" types shall be passed by value.YesAutomatedRequired
A8-4-8Output parameters shall not be used.YesAutomatedRequired
A8-4-9"in-out" parameters declared as T & shall be modified.YesAutomatedRequired
A8-4-10A parameter shall be passed by reference if it can't be NULLYesAutomatedRequired
A8-4-11A smart pointer shall only be used as a parameter type if it expresses lifetime semanticsYesAutomatedRequired
A8-4-12Invalid Use of std::unique_ptrYesAutomatedRequired
A8-4-13Invalid Use of std::shared_ptrYesAutomatedRequired
A8-4-14Interfaces shall be precisely and strongly typedNoNon-automatedRequired
A8-5-0Uninitialized Memory ReadYesAutomatedRequired
A8-5-1Incorrect Order of InitializationYesAutomatedRequired
A8-5-2Initializing Variables Without Using Braced-InitializationYesAutomatedRequired
A8-5-3Auto VariableYesAutomatedRequired
A8-5-4Class Constructor with Parameter Type std::initializer_listYesAutomatedAdvisory
A9-3-1Member functions shall not return non-const raw pointers or references to private or protected data owned by the classYesAutomatedRequired
A9-5-1Unions Shall not be UsedYesAutomatedRequired
A9-6-1Data types used for interfacingYesPartially AutomatedRequired
A9-6-2Bit-fields shall be used only when interfacing to hardware or conforming to communication protocolsNoNon-automatedRequired
A10-0-1Public Inheritance not Used in a "is-a" RelationshipYesNon-automatedRequired
A10-0-2Membership or non-public inheritance shall be used to implement "has-a" relationshipNoNon-automatedRequired
A10-1-1Multiple Base ClassesYesAutomatedRequired
A10-2-1Non-virtual public or protected member functions shall not be redefined in derived classesYesAutomatedRequired
A10-3-1Virtual function declaration shall contain exactly one of the three specifiers: (1) virtual, (2) override, (3) finalYesAutomatedRequired
A10-3-2Use OverrideYesAutomatedRequired
A10-3-3Virtual functions shall not be introduced in a final classYesAutomatedRequired
A10-3-5User-defined assignment operator shall not be virtualYesAutomatedRequired
A10-4-1Hierarchies should be based on interface classesYesNon-automatedAdvisory
A11-0-1A non-POD type should be defined as classYesAutomatedAdvisory
A11-0-2A type defined as struct shall: (1) provide only public data members, (2) not provide any special member functions or methods, (3) not be a base of another struct or class, (4) not inherit from another struct or classYesAutomatedRequired
A11-3-1Friend declarations shall not be used.YesAutomatedRequired
A12-0-1If a class declares a copy or move operation, or a destructor, either via "=default", "=delete", or via a user-provided declaration, then all others of these five special member functions shall be declared as well.YesAutomatedRequired
A12-0-2Bitwise operations and operations that assume data representation in memory shall not be performed on objects.YesAutomatedRequired
A12-1-1Constructors shall explicitly initialize all virtual base classes, all direct non-virtual base classes and all non-static data members.YesAutomatedRequired
A12-1-2Both NSDMI and a non-static member initializer in a constructor shall not be used in the same type.YesAutomatedRequired
A12-1-3If all user-defined constructors of a class initialize data members with constant values that are the same across all constructors, then data members shall be initialized using NSDMI instead.YesAutomatedRequired
A12-1-4All constructors that are callable with a single argument of fundamental type shall be declared explicit.YesAutomatedRequired
A12-1-5Common class initialization for non-constant members shall be done by a delegating constructor.YesPartially AutomatedRequired
A12-1-6Derived classes that need all base class constructors and no further initialization shall use inheriting constructorsYesAutomatedRequired
A12-4-1Destructor of a base class shall be public virtual, public override or protected non-virtualYesAutomatedRequired
A12-4-2If a public destructor of a class is non-virtual, then the class should be declared final.YesAutomatedAdvisory
A12-6-1All class data members that are initialized by the constructor shall be initialized using member initializers.YesAutomatedRequired
A12-7-1If the behavior of a user-defined special member function is identical to implicitly defined special member function, then it shall be defined =default or be left undefined.YesAutomatedRequired
A12-8-1Move and copy constructors shall move and respectively copy base classes and data members of a class, without any side effectsYesAutomatedRequired
A12-8-2User-defined copy and move assignment operators should use user-defined no-throw swap function.YesAutomatedAdvisory
A12-8-3Moved-from object shall not be read-accessed.YesPartially AutomatedAdvisory
A12-8-4Move constructor shall not initialize its class members and base classes using copy semantics.YesAutomatedRequired
A12-8-5A copy assignment and a move assignment operators shall handle self-assignment.YesAutomatedRequired
A12-8-6Copy and move constructors and copy assignment and move assignment operators shall be declared protected or defined "=delete" in base class.YesAutomatedRequired
A12-8-7Assignment operators should be declared with the ref-qualifier &.YesAutomatedAdvisory
A13-1-2User defined suffixes of the user defined literal operators shall start with underscore followed by one or more lettersYesAutomatedRequired
A13-1-3User defined literals operators shall only perform conversion of passed parametersYesAutomatedRequired
A13-2-1An assignment operator shall return a reference to "this"YesAutomatedRequired
A13-2-2A binary arithmetic operator and a bitwise operator shall return a "prvalue"YesAutomatedRequired
A13-2-3A relational operator shall return a boolean valueYesAutomatedRequired
A13-3-1A function that contains "forwarding reference" as its argument shall not be overloadedYesAutomatedRequired
A13-5-1If "operator[]" is to be overloaded with a non-const version, const version shall also be implementedYesAutomatedRequired
A13-5-2All user-defined conversion operators shall be defined explicitYesAutomatedRequired
A13-5-3User-defined conversion operators should not be usedYesAutomatedAdvisory
A13-5-4If two opposite operators are defined, one shall be defined in terms of the otherYesAutomatedRequired
A13-5-5Comparison operators shall be non-member functions with identical parameter types and noexceptYesAutomatedRequired
A13-6-1Digit sequences separators ' shall only be used as follows: (1) for decimal, every 3 digits, (2) for hexadecimal, every 2 digits, (3) for binary, every 4 digitsYesAutomatedRequired
A14-1-1A template should check if a specific template argument is suitable for this templateYesNon-automatedAdvisory
A14-5-1A template constructor shall not participate in overload resolution for a single argument of the enclosing class typeYesAutomatedRequired
A14-5-2Class members that are not dependent on template class parameters should be defined in a separate base classYesPartially AutomatedAdvisory
A14-5-3A non-member generic operator shall only be declared in a namespace that does not contain class (struct) type, enum type or union type declarationsYesAutomatedAdvisory
A14-7-1A type used as a template argument shall provide all members that are used by the templateYesAutomatedRequired
A14-7-2Template specialization shall be declared in the same file as the primary templateYesAutomatedRequired
A14-8-2Explicit specializations of function templates shall not be usedYesAutomatedRequired
A15-0-1A function shall not exit with an exception if it is able to complete its taskNoNon-automatedRequired
A15-0-2At least the basic guarantee for exception safety shall be provided for all operations. In addition, each function may offer either the strong guarantee or the nothrow guaranteeNoPartially AutomatedRequired
A15-0-3Exception safety guarantee of a called function shall be consideredNoNon-automatedRequired
A15-0-4Unchecked exceptions shall be used to represent errors from which the caller cannot reasonably be expected to recover.NoNon-automatedRequired
A15-0-5Checked exceptions shall be used to represent errors from which the caller can reasonably be expected to recoverNoNon-automatedRequired
A15-0-6An analysis shall be performed to analyze the failure modes of exception handlingNoNon-automatedRequired
A15-0-7Exception handling mechanism shall guarantee a deterministic worst-case time execution timeNoPartially AutomatedRequired
A15-0-8A worst-case execution time (WCET) analysis shall be performed to determine maximum execution time constraints of the software, covering in particular the exceptions processingNoNon-automatedRequired
A15-1-1Only instances of types derived from std::exception should be thrownYesAutomatedAdvisory
A15-1-2An exception object shall not be a pointerYesAutomatedRequired
A15-1-3All thrown exceptions should be uniqueYesAutomatedAdvisory
A15-1-4If a function exits with an exception, then before a throw, the function shall place all objects/resources that the function constructed in valid states or it shall delete themYesPartially AutomatedRequired
A15-1-5Exceptions thrown across execution boundariesYesNon-automatedRequired
A15-2-1Constructors that are not noexcept shall not be invoked before program startupYesAutomatedRequired
A15-2-2If a constructor is not noexcept and the constructor cannot finish object initialization, then it shall deallocate the object's resources and it shall throw an exceptionYesPartially AutomatedRequired
A15-3-2If a function throws an exception, it shall be handled when meaningful actions can be taken, otherwise it shall be propagatedNoNon-automatedRequired
A15-3-3Unhandled Exceptions on Main FunctionYesPartially AutomatedRequired
A15-3-4Catch-all (ellipsis and std::exception) handlers shall be used only in (a) main, (b) task main functions, (c) in functions that are supposed to isolate independent components and (d) when calling third-party code that uses exceptions not according to AUTOSAR C++14 guidelines YesNon-automatedRequired
A15-3-5A class type exception shall be caught by reference or const referenceYesAutomatedRequired
A15-4-1Dynamic exception-specification shall not be used YesAutomatedRequired
A15-4-2If a function is declared to be noexcept, noexcept(true) or noexcept(<truecondition>), then it shall not exit with an exceptionYesAutomatedRequired
A15-4-3The noexcept specification of a function shall either be identical across all translation units, or identical or more restrictive between a virtual member function and an overriderYesAutomatedRequired
A15-4-4A declaration of non-throwing function shall contain noexcept specificationYesAutomatedRequired
A15-4-5Checked exceptions that could be thrown from a function shall be specified together with the function declaration and they shall be identical in all function declarations and for all its overriders.YesAutomatedRequired
A15-5-1All user-provided class destructors, deallocation functions, move constructors, move assignment operators and swap functions shall not exit with an exception. A noexcept exception specification shall be added to these functions as appropriateYesAutomatedRequired
A15-5-2Program shall not be abruptly terminatedYesAutomatedRequired
A15-5-3The std::terminate() function shall not be called implicitlyYesAutomatedRequired
A16-0-1Incorrect Use of Pre-processorYesAutomatedRequired
A16-2-1Header File NameYesAutomatedRequired
A16-2-2There shall be no unused include directives (slow)YesAutomatedRequired
A16-2-3An include directive shall be added explicitly for every symbol used in a fileYesNon-automatedRequired
A16-6-1#error directive shall not be usedYesAutomatedRequired
A16-7-1The #pragma directive shall not be usedYesAutomatedRequired
A17-0-1Reserved Builtin MacrosYesAutomatedRequired
A17-0-2All project’s code including used libraries and any third-party user code shall conform to the AUTOSAR C++14 Coding GuidelinesNoNon-automatedRequired
A17-1-1Use of the C Standard Library shall be encapsulated and isolatedNoNon-automatedRequired
A17-6-1Non-standard entities shall not be added to standard namespacesYesAutomatedRequired
A18-0-1The C library facilities shall only be accessed through C++ library headersYesAutomatedRequired
A18-0-2The error state of a conversion from string to a numeric value shall be checkedYesAutomatedRequired
A18-0-3Library <clocale> (locale.h)YesAutomatedRequired
A18-1-1C-style ArrayYesAutomatedRequired
A18-1-2The std::vector<bool> specialization shall not be usedYesAutomatedRequired
A18-1-3The std::auto_ptr type shall not be usedYesAutomatedRequired
A18-1-4A pointer pointing to an element of an array of objects shall not be passed to a smart pointer of single object typeYesAutomatedRequired
A18-1-6All std::hash specializations for user-defined types shall have a noexcept function call operatorYesAutomatedRequired
A18-5-1Functions malloc, calloc, realloc and free shall not be usedYesAutomatedRequired
A18-5-2Non-placement new or delete expressions shall not be usedYesPartially AutomatedRequired
A18-5-3The form of the delete expression shall match the form of the new expression used to allocate the memoryYesAutomatedRequired
A18-5-4If a project has a sized or unsized version of operator "delete" globally defined, then both sized and unsized versions shall be definedYesAutomatedRequired
A18-5-5Memory management functions shall ensure the followingNoPartially AutomatedRequired
A18-5-6An analysis shall be performed to analyze the failure modes of dynamic memory managementNoNon-automatedRequired
A18-5-7Dynamic Memory Usage on Realtime PhaseYesNon-automatedRequired
A18-5-8Objects that do not outlive a function shall have automatic storage durationYesPartially AutomatedRequired
A18-5-9New Method Throwing an ExceptionYesAutomatedRequired
A18-5-10Placement new shall be used only with properly aligned pointers to sufficient storage capacityNoAutomatedRequired
A18-5-11operator "new" and operator "delete" shall be defined togetherYesAutomatedRequired
A18-9-1The std::bind shall not be usedYesAutomatedRequired
A18-9-2Forwarding values to other functions shall be done via: (1) std::move if the value is an rvalue reference, (2) std::forward if the value is forwarding referenceYesAutomatedRequired
A18-9-3The std::move shall not be used on objects declared const or const&YesAutomatedRequired
A18-9-4An argument to std::forward shall not be subsequently usedYesAutomatedRequired
A20-8-1An already-owned pointer value shall not be stored in an unrelated smart pointerYesAutomatedRequired
A20-8-2A std::unique_ptr shall be used to represent exclusive ownershipYesAutomatedRequired
A20-8-3A std::shared_ptr shall be used to represent shared ownershipYesAutomatedRequired
A20-8-4A std::unique_ptr shall be used over std::shared_ptr if ownership sharing is not requiredYesAutomatedRequired
A20-8-5std::make_unique shall be used to construct objects owned by std::unique_ptrYesAutomatedRequired
A20-8-6std::make_shared shall be used to construct objects owned by std::shared_ptrYesAutomatedRequired
A20-8-7Cyclic Structure of std::shared_ptrYesNon-automatedRequired
A21-8-1Arguments to character-handling functions shall be representable as an unsigned charYesAutomatedRequired
A23-0-1An iterator shall not be implicitly converted to const_iteratorYesAutomatedRequired
A23-0-2Elements of a container shall only be accessed via valid references, iterators, and pointersNoAutomatedRequired
A25-1-1Predicate Function Objects Copied IncorrectlyYesAutomatedRequired
A25-4-1Ordering predicates used with associative containers and STL sorting and related algorithms shall adhere to a strict weak ordering relationNoNon-automatedRequired
A26-5-1Pseudorandom numbers shall not be generated using std::rand()YesAutomatedRequired
A26-5-2Random number engines shall not be default-initializedYesAutomatedRequired
A27-0-1Inputs from independent components shall be validatedYesNon-automatedRequired
A27-0-2A C-style string shall guarantee sufficient space for data and the null terminatorNoAutomatedAdvisory
A27-0-3Alternate input and output operations on a file stream shall not be used without an intervening flush or positioning callYesAutomatedRequired
A27-0-4C-style strings shall not be usedYesAutomatedRequired
M0-1-1A project shall not contain unreachable codeYesAutomatedRequired
M0-1-2A project shall not contain infeasible pathsYesAutomatedRequired
M0-1-3A project shall not contain unused variablesYesAutomatedRequired
M0-1-4A project shall not contain non-volatile POD variables having only one use.YesAutomatedRequired
M0-1-8All functions with void return type shall have external side effect(s)YesAutomatedRequired
M0-1-9There shall be no dead codeNoAutomatedRequired
M0-1-10Every defined function shall be called at least once.YesAutomatedAdvisory
M0-2-1Assigning Object to an Overlapping Object (Partial)YesAutomatedRequired
M0-3-1Minimization of run-time failures shall be ensured by the use of static analysis toolsYesNon-automatedRequired
M0-3-2If a function generates error information, then that error information shall be testedNoNon-automatedRequired
M0-4-1Undocumented Use of Scaled-integer or Fixed-point ArithmeticYesNon-automatedRequired
M0-4-2Undocumented Use of Floating-point ArithmeticYesNon-automatedRequired
M1-0-2Multiple compilers shall only be used if they have a common, defined interfaceNoNon-automatedRequired
M2-7-1The character sequence /* shall not be used within a C-style comment.YesAutomatedRequired
M2-10-1Different identifiers shall be typographically unambiguousYesAutomatedRequired
M2-13-2Octal constants (other than zero) and octal escape sequences (other than "\0" ) shall not be used.YesAutomatedRequired
M2-13-3A "U" suffix shall be applied to all octal or hexadecimal integer literals of unsigned type.YesAutomatedRequired
M2-13-4Literal suffixes shall be upper caseYesAutomatedRequired
M3-1-2Functions shall not be declared at block scopeYesAutomatedRequired
M3-2-1All declarations of an object or function shall have compatible typesYesAutomatedRequired
M3-2-2The One Definition RuleYesAutomatedRequired
M3-2-3A type, object or function that is used in multiple translation units shall be declared in one and only one fileYesAutomatedRequired
M3-2-4An identifier with external linkage shall have exactly one definitionYesAutomatedRequired
M3-3-2If a function has internal linkage then all redeclarations shall include the static storage class specifierYesAutomatedRequired
M3-4-1Declarations at Lowest ScopeYesAutomatedRequired
M3-9-1The types used for an object, a function return type, or a function parameter shall be token-for-token identical in all declarations and re-declarationsYesAutomatedRequired
M3-9-3The underlying bit representations of floating-point values shall not be usedYesAutomatedRequired
M4-5-1Expressions with type bool shall not be used as operands to built-in operators other than the assignment operator =, the logical operators &&, ||, !, the equality operators == and !=, the unary & operator, and the conditional operatorYesAutomatedRequired
M4-5-3Character OperatorsYesAutomatedRequired
M4-10-1NULL shall not be used as an integer valueYesAutomatedRequired
M4-10-2Literal zero (0) shall not be used as the null-pointer-constant.YesAutomatedRequired
M5-0-2Limited dependence should be placed on C++ operator precedence rules in expressionsYesAutomatedAdvisory
M5-0-3A cvalue expression shall not be implicitly converted to a different underlying typeYesAutomatedRequired
M5-0-4An implicit integral conversion shall not change the signedness of the underlying typeYesAutomatedRequired
M5-0-5There shall be no implicit floating-integral conversionsYesAutomatedRequired
M5-0-6An implicit integral or floating-point conversion shall not reduce the size of the underlying typeYesAutomatedRequired
M5-0-7There shall be no explicit floating-integral conversions of a cvalue expressionYesAutomatedRequired
M5-0-8An explicit integral or floating-point conversion shall not increase the size of the underlying type of a cvalue expressionYesAutomatedRequired
M5-0-9An explicit integral conversion shall not change the signedness of the underlying type of a cvalue expressionYesAutomatedRequired
M5-0-10If the bitwise operators ~ and << are applied to an operand with an underlying type of unsigned char or unsigned short, the result shall be immediately cast to the underlying type of the operandYesAutomatedRequired
M5-0-11The plain char type shall only be used for the storage and use of character valuesYesAutomatedRequired
M5-0-12Signed char and unsigned char type shall only be used for the storage and use of numeric valuesYesAutomatedRequired
M5-0-14The first operand of a conditional-operator shall have type boolYesAutomatedRequired
M5-0-15Array indexing over pointer arithmeticYesAutomatedRequired
M5-0-16A pointer operand and any pointer resulting from pointer arithmetic using that operand shall both address elements of the same arrayYesAutomatedRequired
M5-0-17Subtraction between pointers shall only be applied to pointers that address elements of the same arrayYesAutomatedRequired
M5-0-18>, >=, <, <= shall not be applied to objects of pointer type, except where they point to the same arrayYesAutomatedRequired
M5-0-20Non-constant operands to a binary bitwise operator shall have the same underlying typeYesAutomatedRequired
M5-0-21Bitwise operators shall only be applied to operands of unsigned underlying typeYesAutomatedRequired
M5-2-2A pointer to a virtual base class shall only be cast to a pointer to a derived class by means of dynamic_castYesAutomatedRequired
M5-2-3Casts from a base class to a derived class should not be performed on polymorphic typesYesAutomatedAdvisory
M5-2-6A cast shall not convert a pointer to a function to any other pointer type, including a pointer to function typeYesAutomatedRequired
M5-2-8An object with integer type or pointer to void type shall not be converted to an object with pointer type.YesAutomatedRequired
M5-2-9Pointer to Integer CastYesAutomatedRequired
M5-2-10The increment (++) and decrement (--) operators shall not be mixed with other operators in an expressionYesAutomatedRequired
M5-2-11The comma operator, && operator and the || operator shall not be overloadedYesAutomatedRequired
M5-2-12Array to Pointer DecayYesAutomatedRequired
M5-3-1Each operand of the ! operator, the logical && or the logical || operators shall have type boolYesAutomatedRequired
M5-3-2Unary Minus Operator Applied to an Expression with an Unsigned TypeYesAutomatedRequired
M5-3-3The unary & operator shall not be overloadedYesAutomatedRequired
M5-3-4Evaluation of the operand to the sizeof operator shall not contain side effectsYesAutomatedRequired
M5-8-1The right hand operand of a shift operator shall lie between zero and one less than the width in bits of the underlying type of the left hand operand.YesPartially AutomatedRequired
M5-14-1The right hand operand of a logical &&, || operators shall not contain side effectsYesAutomatedRequired
M5-17-1The semantic equivalence between a binary operator and its assignment operator form shall be preservedYesNon-automatedRequired
M5-18-1The comma operator shall not be used.YesAutomatedRequired
M5-19-1Evaluation of constant unsigned integer expressions shall not lead to wrap-aroundNoAutomatedRequired
M6-2-1Assignment operators shall not be used in sub-expressionsYesAutomatedRequired
M6-2-2Floating-point expressions shall not be directly or indirectly tested for equality or inequalityYesPartially AutomatedRequired
M6-2-3Before preprocessing, a null statement shall only occur on a line by itself; it may be followed by a comment, provided that the first character following the null statement is a white-space characterYesAutomatedRequired
M6-3-1The statement forming the body of a switch, while, do ... while or for statement shall be a compound statementYesAutomatedRequired
M6-4-1An if ( condition ) construct shall be followed by a compound statement. The else keyword shall be followed by either a compound statement, or another if statementYesAutomatedRequired
M6-4-2All if and else if constructs shall be terminated with an else clauseYesAutomatedRequired
M6-4-3A switch statement shall be a well-formed switch statementYesAutomatedRequired
M6-4-4A switch-label shall only be used when the most closely-enclosing compound statement is the body of a switch statementYesAutomatedRequired
M6-4-5An unconditional throw or break statement shall terminate every non-empty switch-clauseYesAutomatedRequired
M6-4-6The final clause of a switch statement shall be the default-clauseYesAutomatedRequired
M6-4-7The condition of a switch statement shall not have bool typeYesAutomatedRequired
M6-5-2If loop-counter is not modified by -- or ++, then, within condition, the loop-counter shall only be used as an operand to <=, <, > or >=YesAutomatedRequired
M6-5-3The loop-counter shall not be modified within condition or statementYesAutomatedRequired
M6-5-4The loop-counter shall be modified by one of: --, ++, -= n, or += n; where n remains constant for the duration of the loopYesAutomatedRequired
M6-5-5A loop-control-variable other than the loop-counter shall not be modified within condition or expressionYesAutomatedRequired
M6-5-6A loop-control-variable other than the loop-counter which is modified in statement shall have type boolYesAutomatedRequired
M6-6-1Any label referenced by a goto statement shall be declared in the same block, or in a block enclosing the goto statementYesAutomatedRequired
M6-6-2The goto statement shall jump to a label declared later in the same function bodyYesAutomatedRequired
M6-6-3Continue Statement Used in a not Well-formed For LoopYesAutomatedRequired
M7-1-2A pointer or reference parameter in a function shall be declared as pointer to const or reference to const if the corresponding object is not modifiedYesAutomatedRequired
M7-3-1Global Namespace DeclarationsYesAutomatedRequired
M7-3-2The identifier main shall not be used for a function other than the global function mainYesAutomatedRequired
M7-3-3There shall be no unnamed namespaces in header files.YesAutomatedRequired
M7-3-4Using-directives shall not be used.YesAutomatedRequired
M7-3-6using-directives and using-declarations (excluding class scope or function scope using-declarations) shall not be used in header files.YesAutomatedRequired
M7-4-1Assembly Language Code Usage not DocumentedYesNon-automatedRequired
M7-4-2Assembler instructions shall only be introduced using the asm declaration.YesAutomatedRequired
M7-4-3Assembly language shall be encapsulated and isolated.YesAutomatedRequired
M7-5-1A function shall not return a reference or a pointer to an automatic variable (including parameters), defined within the function.YesNon-automatedRequired
M7-5-2The address of an object with automatic storage shall not be assigned to another object that may persist after the first object has ceased to exist.YesNon-automatedRequired
M8-0-1Single DeclarationsYesAutomatedRequired
M8-3-1Parameters in an overriding virtual function shall either use the same default arguments as the function they override, or else shall not specify any default arguments.YesAutomatedRequired
M8-4-2The identifiers used for the parameters in a re-declaration of a function shall be identical to those in the declaration.YesAutomatedRequired
M8-4-4A function identifier shall either be used to call the function or it shall be preceded by &.YesAutomatedRequired
M8-5-2Incorrect Initializer ListsYesAutomatedRequired
M9-3-1Const Member Function Returning Non-Const Pointer or ReferenceYesAutomatedRequired
M9-3-3If a member function can be made static then it shall be made static, otherwise if it can be made const then it shall be made const.YesAutomatedRequired
M9-6-1When the absolute positioning of bits representing a bit-field is required, then the behavior and packing of bit-fields shall be documentedNoNon-automatedRequired
M9-6-4Bit-field LengthYesAutomatedRequired
M10-1-1Class Derived From Virtual BasesYesAutomatedAdvisory
M10-1-2A base class shall only be declared virtual if it is used in a diamond hierarchyYesAutomatedRequired
M10-1-3An accessible base class shall not be both virtual and non-virtual in the same hierarchyYesAutomatedRequired
M10-2-1Similar Entity Names within Multiple Inheritance YesAutomatedAdvisory
M10-3-3A virtual function shall only be overridden by a pure virtual function if it is itself declared as pure virtualYesAutomatedRequired
M11-0-1Member Data in Non-POD Class not PrivateYesAutomatedRequired
M12-1-1An object's dynamic type shall not be used from the body of its constructor or destructorYesAutomatedRequired
M14-5-3A copy assignment operator shall be declared when there is a template assignment operator with a parameter that is a generic parameterYesAutomatedRequired
M14-6-1In 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->YesAutomatedRequired
M15-0-3Control shall not be transferred into a try or catch block using a goto or a switch statementYesAutomatedRequired
M15-1-1Exception ObjectYesAutomatedRequired
M15-1-2NULL ThrowYesAutomatedRequired
M15-1-3Empty ThrowYesAutomatedRequired
M15-3-1Exceptions shall be raised only after start-up and before termination of the programYesAutomatedRequired
M15-3-3Handlers of a function-try-block implementation of a class constructor or destructor shall not reference non-static members from this class or its basesYesAutomatedRequired
M15-3-4Each exception explicitly thrown in the code shall have a handler of a compatible type in all call paths that could lead to that pointYesAutomatedRequired
M15-3-6Order of Catch Blocks with Derived ClassesYesAutomatedRequired
M15-3-7Where multiple handlers are provided in a single try-catch statement or function-try-block, any ellipsis (catch-all) handler shall occur lastYesAutomatedRequired
M16-0-1#include Directives Not Grouped TogetherYesAutomatedRequired
M16-0-2Macros shall only be #define'd or #undef'd in the global namespace.YesAutomatedRequired
M16-0-5Function-like Macro Containing Preprocessing DirectivesYesAutomatedRequired
M16-0-6In 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 ##YesAutomatedRequired
M16-0-7Undefined macro identifiers shall not be used in #if or #elif preprocessor directives, except as operands to the defined operatorYesAutomatedRequired
M16-0-8Invalid Preprocessor DirectivesYesAutomatedRequired
M16-1-1The defined preprocessor operator shall only be used in one of the two standard formsYesAutomatedRequired
M16-1-2All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if, #ifdef or #ifndef directive to which they are relatedYesAutomatedRequired
M16-2-3Include guards shall be providedYesAutomatedRequired
M16-3-1There shall be at most one occurrence of the # or ## operators in a single macro definitionYesAutomatedRequired
M16-3-2The # and ## operators should not be usedYesAutomatedAdvisory
M17-0-2The names of standard library macros and objects shall not be reusedYesAutomatedRequired
M17-0-3Standard Library Function NamesYesAutomatedRequired
M17-0-5The setjmp macro and the longjmp function shall not be usedYesAutomatedRequired
M18-0-3<cstdlib> Library FunctionsYesAutomatedRequired
M18-0-4Time Handling Functions of <ctime>YesAutomatedRequired
M18-0-5Unbounded Functions of <cstring>YesAutomatedRequired
M18-2-1The macro offsetof shall not be usedYesAutomatedRequired
M18-7-1The signal handling facilities of <csignal> shall not be usedYesAutomatedRequired
M19-3-1The error indicator errno shall not be usedYesAutomatedRequired
M27-0-1The stream input/output library <cstdio> shall not be usedYesAutomatedRequired