Which Static Code Checkers does the DATAFLOW Code Generator Support?
by Marco Wuelser
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
- PC Lint Plus (V2.0)
- Axivion Bauhaus (V2.0)
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 |
PC Lint Plus V1.3 |
The PC Lint Plus static code checker supports C++11/14 code as well as C+ 98/03 code. See https://www.gimpel.com/ |
Added in V2.0, documentation will be added on release. History: Added in V2.0 |
Axivion Bauhaus |
Added in V2.0, documentation will be added on release. History: Added in V2.0 |
Supported Rule Set
The following C++ rule sets are supported by the DATAFLOW Code Generator:
- MISRA C++:2008
- Autosar C++ 19.04 (V2.0)
- PC Lint (Built in Rules)
- Axivion Bauhaus (V2.0)
MISRA C++:2008 |
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 |
Autosar C++ 19.03 |
The Autosar rule set defines various rules to remove unsafe constructs from the C++ language. The rule set only works with C++11/14 code and shares a lot of rules with the MISRA rule set. Added in V2.0, documentation will be added on release. History: Added in V2.0 |
PC Lint |
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 |
Axivion Bauhaus |
See https://www.axivion.com/en/ Added in V2.0, documentation will be added on release. History: Added in V2.0 |
Configuration
The static code checker and rule sets can be configured in the Toolchain configuration on the Coding Style page.
Note:
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.
In V2.0, the static checker and ruleset can be configured independent of each other and additional options will be available (see above).
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