CodeCheck Documentation
CodeCheck Documentation - MISRA C 2025

Standard: MISRA C 2025

All RulesAdvisory RulesMandatory RulesRequired Rules
Understand % Coverage52%53%71%48%
Understand Coverage328519
Total Rules6215740
Check IDCheck NameSupportedCategory
MISRA25_1.1The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limitsNoRequired
MISRA25_1.3There shall be no occurrence of undefined or critical unspecified behaviourNoRequired
MISRA25_2.2A project shall not contain dead codeNoRequired
MISRA25_2.6A function should not contain unused label declarationsYesAdvisory
MISRA25_2.8A project should not contain unused object definitionsYesAdvisory
MISRA25_8.1Types shall be explicitly specifiedYesRequired
MISRA25_8.2Function types shall be in prototype form with named parametersYesRequired
MISRA25_10.5The value of an expression should not be cast to an inappropriate essential typeYesAdvisory
MISRA25_10.7If a composite expression is used as one operand of an operator in which the usual arithmetic conversions are performed then the other operand shall not have wider essential typeYesRequired
MISRA25_11.6A cast shall not be performed between pointer to void and an arithmetic typeYesRequired
MISRA25_11.10The _Atomic qualifier shall not be applied to the incomplete type voidYesRequired
MISRA25_12.1The precedence of operators within expressions should be made explicitNoAdvisory
MISRA25_12.3The comma operator should not be usedYesAdvisory
MISRA25_12.4Evaluation of constant expressions should not lead to unsigned integer wrap-aroundNoAdvisory
MISRA25_12.5The sizeof operator shall not have an operand which is a function parameter declared as "array of type"YesMandatory
MISRA25_13.2The value of an expression and its persistent side effects shall be the same under all permitted evaluation orders and shall be independent from thread interleavingNoRequired
MISRA25_14.3Controlling expressions shall not be invariantNoRequired
MISRA25_16.7A switch-expression shall not have essentially Boolean typeYesRequired
MISRA25_17.4All exit paths from a function with non-void return type shall have an explicit return statement with an expressionYesMandatory
MISRA25_17.7The value returned by a function having non-void return type shall be usedYesRequired
MISRA25_17.9A function declared with a _Noreturn function specifier shall not return to its callerYesMandatory
MISRA25_18.1A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operandNoRequired
MISRA25_19.1An object shall not be assigned or copied to an overlapping objectNoMandatory
MISRA25_20.3The #include directive shall be followed by either a <filename> or "filename" sequenceYesRequired
MISRA25_20.7Expressions resulting from the expansion of macro parameters shall be appropriately delimitedNoRequired
MISRA25_20.8The controlling expression of a #if or #elif preprocessing directive shall evaluate to 0 or 1NoRequired
MISRA25_20.9All identifiers used in the controlling expression of #if or #elif preprocessing directives shall be #define'd before evaluationNoRequired
MISRA25_20.12A 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 operatorsNoRequired
MISRA25_20.14All #else, #elif and #endif preprocessor directives shall reside in the same file as the #if, #ifdef or #ifndef directive to which they are relatedYesRequired
MISRA25_21.8The Standard Library termination functions of <stdlib.h> shall not be usedYesRequired
MISRA25_21.15The pointer arguments to the Standard Library functions memcpy, memmove and memcmp shall be pointers to qualified or unqualified versions of compatible typesYesRequired
MISRA25_21.16The pointer arguments to the Standard Library function memcmp shall point to either a pointer type, an essentially signed type, an essentially unsigned type, an essentially Boolean type or an essentially enum typeYesRequired
MISRA25_21.18The size_t argument passed to any function in <string.h> shall have an appropriate valueYesMandatory
MISRA25_22.1All resources obtained dynamically by means of Standard Library functions shall be explicitly releasedYesRequired
MISRA25_22.2A block of memory shall only be freed if it was allocated by means of a Standard Library functionYesMandatory
MISRA25_22.6The value of a pointer to a FILE shall not be used after the associated stream has been closedNoMandatory
MISRA25_23.2A generic selection that is not expanded from a macro shall not contain potential side effects in the controlling expressionYesRequired
MISRA25_23.4A generic association shall list an appropriate typeNoRequired
MISRA25_23.5A generic selection should not depend on implicit pointer type conversionNoAdvisory
MISRA25_23.6The controlling expression of a generic selection shall have an essential type that matches its standard typeNoRequired
MISRA25_DIR_1.1Directive 1.1 Any implementation-defined behaviour on which the output of the program depends shall be documented and understoodNoRequired
MISRA25_DIR_1.2Directive 1.2 The use of language extensions should be minimizedNoAdvisory
MISRA25_DIR_2.1Directive 2.1 All source files shall compile without any compilation errorsYesRequired
MISRA25_DIR_3.1Directive 3.1 All code shall be traceable to documented requirementsNoRequired
MISRA25_DIR_4.1Directive 4.1 Run-time failures shall be minimizedNoRequired
MISRA25_DIR_4.2Directive 4.2 All usage of assembly language should be documentedNoAdvisory
MISRA25_DIR_4.3Directive 4.3 Assembly language shall be encapsulated and isolatedNoRequired
MISRA25_DIR_4.4Directive 4.4 Sections of code should not be "commented out"YesAdvisory
MISRA25_DIR_4.5Directive 4.5 Identifiers in the same name space with overlapping visibility should be typographically unambiguousYesAdvisory
MISRA25_DIR_4.6Directive 4.6 typedefs that indicate size and signedness should be used in place of the basic integer typesYesAdvisory
MISRA25_DIR_4.7Directive 4.7 If a function returns error information, then that error information shall be testedNoRequired
MISRA25_DIR_4.8Directive 4.8 If a pointer to a structure or union is never dereferenced within a translation unit, then the implementation of the object should be hiddenYesAdvisory
MISRA25_DIR_4.9Directive 4.9 A function should be used in preference to a function-like macro where they are interchangeableNoAdvisory
MISRA25_DIR_4.10Directive 4.10 Precautions shall be taken in order to prevent the contents of a header file being included more than onceYesRequired
MISRA25_DIR_4.11Directive 4.11 The validity of values passed to library functions shall be checkedNoRequired
MISRA25_DIR_4.12Directive 4.12 Dynamic memory allocation shall not be usedYesRequired
MISRA25_DIR_4.13Directive 4.13 Functions which are designed to provide operations on a resource should be called in an appropriate sequenceNoAdvisory
MISRA25_DIR_4.14Directive 4.14 The validity of values received from external sources shall be checkedYesRequired
MISRA25_DIR_4.15Directive 4.15 Evaluation of floating-point expressions shall not lead to the undetected generation of infinities and NaNsNoRequired
MISRA25_DIR_5.1Directive 5.1 There shall be no data races between threadsNoRequired
MISRA25_DIR_5.2Directive 5.2 There shall be no deadlocks between threadsNoRequired
MISRA25_DIR_5.3Directive 5.3 There shall be no dynamic thread creationYesRequired