27-07-2018, 11:11 AM
Indeed, because if one wishes to use the strategy of putting all the constants in one well-known place and then have a commercial Static Analysis tool check that code and then the static analysis tool pulls out all the constants that are only used in single places elsewhere in the code:
Then in order to comply with MISRA, one has to either:
For cases ( a ) and ( b ), should a customer specify that Rule 3-4-1 is completely Mandatory and that no violations are allowed under any circumstances, then the code would not meet such a requirement.
However, for case ( c ), the code would not have any violations, but it would be necessary to convince the toolset vendor that this situation was a false-positive and that the rule was not meant to be applied this way.
I was hoping for some clarity here so that if I have a discussion with the toolset vendor I have some evidence regarding how MISRA intended this rule to be applied.
Then in order to comply with MISRA, one has to either:
- Create an individual guideline violation approval and associated deviation record for each individual violation, or
- Create a generic deviation permit together with our reasoning for allowing such a class of deviations, or
- Convince the toolset vendor that the rule was not intended to be applied in this way and that this is a false-positive.
For cases ( a ) and ( b ), should a customer specify that Rule 3-4-1 is completely Mandatory and that no violations are allowed under any circumstances, then the code would not meet such a requirement.
However, for case ( c ), the code would not have any violations, but it would be necessary to convince the toolset vendor that this situation was a false-positive and that the rule was not meant to be applied this way.
I was hoping for some clarity here so that if I have a discussion with the toolset vendor I have some evidence regarding how MISRA intended this rule to be applied.
<t></t>