scitools.com

← CodeCheck catalog

MISRA HIS Subset is a check configuration included with CodeCheck, Understand's static-analysis engine — run it in the GUI, from the command line, or in CI.

MISRA HIS Subset

The MISRA Hersteller Initiative Software (HIS) Subset.

The MISRA checks used by the Herseteller Initiative Software (HIS) metrics:

Enable this configuration in the background or run it manually and sync the results to the Violation Browser to calculate the metric(s).

Checks

Check IDCheck NameSupportedCategory
MISRA12_1.11.1 The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limitsYesRequired
MISRA12_1.21.2 Language extensions should not be used (Partial)YesAdvisory
MISRA12_1.31.3 There shall be no occurrence of undefined or critical unspecified behaviour (Partial)YesRequired
MISRA12_2.12.1 A project shall not contain unreachable codeYesRequired
MISRA12_2.22.2 There shall be no dead code (Partial)YesRequired
MISRA12_3.13.1 The character sequences /* and // shall not be used within a commentYesRequired
MISRA12_4.14.1 Octal and Hexadecimal SequencesYesRequired
MISRA12_4.24.2 Trigraphs should not be usedYesAdvisory
MISRA12_5.35.3 Shadowed IdentifiersYesRequired
MISRA12_5.65.6 A typedef name shall be a unique identifierYesRequired
MISRA12_5.75.7 A tag name shall be a unique identifierYesRequired
MISRA12_6.26.2 Signed single-bit named bit-fieldsYesRequired
MISRA12_7.17.1 Octal constants shall not be usedYesRequired
MISRA12_8.18.1 Types shall be explicitly specifiedYesRequired
MISRA12_8.28.2 Use Named Parameters and Prototype FormYesRequired
MISRA12_8.38.3 All declarations of an object or function shall use the same names and type qualifiersYesRequired
MISRA12_8.48.4 A compatible declaration shall be visible when an object or function with external linkage is definedYesRequired
MISRA12_8.58.5 An external object or function shall be declared once in one and only one fileYesRequired
MISRA12_8.68.6 An identifier with external linkage shall have exactly one external definitionYesRequired
MISRA12_8.78.7 Functions and objects should not be defined with external linkage if they are referenced in only one translation unitYesAdvisory
MISRA12_8.88.8 Use the static keyword for internal linkageYesRequired
MISRA12_8.98.9 Objects shall be local if only accessed from one functionYesAdvisory
MISRA12_8.138.13 A pointer should point to a const-qualified type whenever possibleYesAdvisory
MISRA12_9.19.1 The value of an object with automatic storage duration shall not be read before it has been setYesMandatory
MISRA12_9.29.2 The initializer for an aggregate or union shall be enclosed in bracesYesRequired
MISRA12_10.110.1 Operands shall not be of an inappropriate essential typeYesRequired
MISRA12_10.210.2 Expressions of essentially character type shall not be used inappropriately in addition and subtraction operationsYesRequired
MISRA12_10.310.3 The value of an expression shall not be assigned to an object with a narrower essential type or of a different essential type categoryYesRequired
MISRA12_10.410.4 Both operands of an operator in which the usual arithmetic conversions are performed shall have the same essential type categoryYesRequired
MISRA12_10.610.6 The value of a composite expression shall not be assigned to an object with wider essential typeYesRequired
MISRA12_10.710.7 Implicit Casts of OperationsYesRequired
MISRA12_10.810.8 The value of a composite expression shall not be cast to a different essential type category or a wider essential typeYesRequired
MISRA12_11.111.1 Conversions shall not be performed between a pointer to a function and any other typeYesRequired
MISRA12_11.311.3 A cast shall not be performed between a pointer to object type and a pointer to a different object typeYesRequired
MISRA12_11.811.8 A cast shall not remove any const or volatile qualification from the type pointed to by a pointerYesRequired
MISRA12_12.112.1 The precedence of operators within expressions should be made explicitYesAdvisory
MISRA12_12.212.2 The 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.YesRequired
MISRA12_12.312.3 The comma operator shall not be used.YesAdvisory
MISRA12_12.412.4 Evaluation of constant expressions should not lead to unsigned integer wrap-aroundYesAdvisory
MISRA12_13.213.2 The value of an expression and its persistent side effects shall be the same under all permitted evaluation ordersYesRequired
MISRA12_13.413.4 The result of an assignment operator should not be usedYesAdvisory
MISRA12_13.513.5 The right hand operand of a logical && or || operator shall not contain persistent side effectsYesRequired
MISRA12_13.613.6 The operand of the sizeof operator shall not contain any expression which has potential side effectsYesMandatory
MISRA12_14.114.1 A loop counter shall not have essentially floating typeYesRequired
MISRA12_14.214.2 A for loop shall be well-formedYesRequired
MISRA12_15.115.1 The goto statement should not be usedYesAdvisory
MISRA12_15.215.2 The goto statement shall jump to a label declared later in the same functionYesRequired
MISRA12_15.315.3 Goto Into or Between BlocksYesRequired
MISRA12_15.615.6 The body of an iteration-statement or a selection-statement shall be a compound-statement YesRequired
MISRA12_15.715.7 All if ... else if constructs shall be terminated with an else statementYesRequired
MISRA12_16.216.2 A switch label shall only be used when the most closely-enclosing compound statement is the body of a switch statementYesRequired
MISRA12_16.316.3 An unconditional break statement shall terminate every switch-clauseYesRequired
MISRA12_16.416.4 Every switch statement shall have a default labelYesRequired
MISRA12_16.516.5 A default label shall appear as either the first or the last switch label of a switch statementYesRequired
MISRA12_16.616.6 Every switch statement shall have at least two switch-clausesYesRequired
MISRA12_16.716.7 Switch BooleanYesRequired
MISRA12_17.117.1 The features of <stdarg.h> shall not be usedYesRequired
MISRA12_17.217.2 Functions shall not call themselves, either directly or indirectlyYesRequired
MISRA12_17.317.3 A function shall not be declared implicitlyYesMandatory
MISRA12_17.417.4 Always return a value in non-void functionsYesRequired
MISRA12_18.118.1 A pointer resulting from arithmetic on a pointer operand shall address an element of the same array as that pointer operand (Partial)YesRequired
MISRA12_18.218.2 Subtraction between pointers shall only be applied to pointers that address elements of the same arrayYesRequired
MISRA12_18.318.3 The relational operators >, >=, < and <= shall not be applied to objects of pointer type except where they point into the same objectYesRequired
MISRA12_18.418.4 The +, -, += and -= operators should not be applied to an expression of pointer typeYesAdvisory
MISRA12_18.518.5 Declarations should contain no more than two levels of pointer nestingYesAdvisory
MISRA12_18.618.6 The address of an object with automatic storage shall not be copied to another object that persists after the first object has ceased to existYesRequired
MISRA12_19.119.1 An object shall not be assigned or copied to an overlapping object (Partial)YesMandatory
MISRA12_20.220.2 Invalid Header NameYesRequired
MISRA12_20.320.3 The #include directive shall be followed by either a <filename> or "filename" sequenceYesRequired
MISRA12_20.420.4 Keyword MacrosYesRequired
MISRA12_20.620.6 Tokens that look like a preprocessing directive shall not occur within a macro argumentYesRequired
MISRA12_20.720.7 Expressions resulting from the expansion of macro parameters shall be enclosed in parenthesesYesRequired
MISRA12_20.920.9 All identifiers used in the controlling expression of #if or #elif preprocessing directives shall be #define'd before evaluationYesRequired
MISRA12_20.1020.10 The # and ## operators should not be usedYesAdvisory
MISRA12_20.1120.11 A macro parameter immediately following a # operator shall not immediately be followed by a ## operatorYesRequired
MISRA12_21.121.1 #define and #undef shall not be used on a reserved identifier or reserved macro nameYesRequired
MISRA12_21.221.2 Reserved Identifiers or MacrosYesRequired
MISRA12_21.321.3 The memory allocation and deallocation functions of &lt;stdlib.h&gt; shall not be usedYesRequired
MISRA12_21.421.4 The standard header file <setjmp.h> shall not be usedYesRequired
MISRA12_21.521.5 Standard Header signal.hYesRequired
MISRA12_21.621.6 C Standard Library I/O FunctionsYesRequired
MISRA12_21.721.7 The atof, atoi, atol and atoll functions of <stdlib.h> shall not be usedYesRequired
MISRA12_21.821.8 The library functions abort, exit, getenv and system of <stdlib.h> shall not be usedYesRequired
MISRA12_21.1021.10 The Standard Library time and date functions shall not be usedYesRequired
MISRA12_DIR_1.1Directive 1.1 Any implementation-defined behaviour on which the output of the program depends shall be documented and understoodNoRequired
MISRA12_DIR_4.4Directive 4.4 Sections of code should not be "commented out"YesAdvisory
MISRA12_DIR_4.6Directive 4.6 Typedefs that indicate size and signedness should be used in place of the basic numerical typesYesAdvisory
MISRA12_DIR_4.7Directive 4.7 If a function returns error information, then that error information shall be testedYesRequired
MISRA12_DIR_4.9Directive 4.9 A function should be used in preference to a function-like macro where they are interchangeableYesAdvisory
MISRA12_DIR_4.11Directive 4.11 The validity of values passed to library functions shall be checked (Partial)YesRequired
MISRA12_DIR_4.12Directive 4.12 Dynamic Memory AllocationYesRequired