Static Code Check Configuration (DATAFLOW Code)
The DATAFLOW Code Generator allows to configure one static code checker. If enabled, it generates suppression comments with justifications for all enabled rulesets.
The code generator generates all code in a standard compatible style so that the number of issues found by static code analyzers is reduced to a minimum. Even with this approach, there remain certain mandatory code constructs, where a rule can not be fully satisfied. In that case, a suppression comment is generated to disable that rule for the selected static code checker. Every suppression also contains a justification why the rule has been disabled for this part of the code.
Supported Static Code Checkers
The following static code checkers are supported by the DATAFLOW Code Generator:
- PC Lint
The configuration (see below) allows to select a single static code checker for a given Toolchain. The code generator will then format every suppression in a format that can be understand by the selected checker.
PC Lint 9L
|The PC Lint static code checker supports only C++98/03 code. See https://www.gimpel.com/|
|History: Added in V1.0|
Supported Rule Set
The following C++ rule sets are supported by the DATAFLOW Code Generator:
- MISRA C++:2008
- PC Lint (Built in Rules)
The MISRA rule set defines various rules to remove unsafe constructs from the C++ language. The rule set only works with C++98/03 code.
Refer to the MISRA:2008 documentation for details: https://www.misra.org.uk/misra-c-plus-plus/
History: Added in V2.0
The PC Lint and PC Lint Plus static code checker contains built in rules in addition to the MISRA / Autosar rulesets. Refer to the PC Lint documentation for details: https://www.gimpel.com/
History: Added in V1.0
The static code checker and rule sets can be configured in the Toolchain configuration on the Coding Style page.
For V1.6 the only supported option is PC-Lint 9L. This will also enable the MISRA C++ Suppression and is not suitable for C++11 or C++ 14 code.
This Article has been written based on V1.6.1 of the DATAFLOW Designer software.
Latest update 2021-10-15 by WUM.
Required Module: DATAFLOW Code, DATAFLOW Frames
Please sign in to leave a comment.