How to deal mandatory rules in the MISRA compliance 2016?

Forum for discussing and asking questions about the MISRA Compliance:2016 "Achieving compliance with MISRA Coding Guidelines"

Moderator: david ward

Post Reply
yohura
Posts: 2
Joined: Mon Apr 22, 2019 12:45 am
Company: B

How to deal mandatory rules in the MISRA compliance 2016?

Post by yohura » Thu Jul 11, 2019 8:10 am

I'm reviewing code based on the MISRA compliance 2016, and want to know interpretation of mandatory rules in the adopted code.
In MISRA compliance 2016, violate mandatory rules must not be permitted, but "non-compliant adopted code" is reasonable to deviate the rules.
Should I fix the code pointed out by mandatory rules, or need not ?

misra-c
Posts: 556
Joined: Thu Jan 05, 2006 1:11 pm

Re: How to deal mandatory rules in the MISRA compliance 2016?

Post by misra-c » Fri Oct 11, 2019 3:04 pm

It is never acceptable for a project to contain violations of any guideline that MISRA has classified as "Mandatory" within one of its subsets (e.g. MISRA C:2012). Any violation of a Mandatory guidelines is likely to indicate a real issue, which is why MISRA does not allow a deviation to be used to cover any non-compliance.

If the use of adopted code within a project results in the violation of a Mandatory guideline, then management of that violation will depend on the cause:

1) If it is due to an interaction with the project's native code, then the native code should be modified to remove the violation.

2) If it is due to an issue within the adopted code itself, then the author of the adopted code should be advised of the issue and a request made to have it modified to eliminate the violation.

The "non-compliant adopted code" deviation reason (and the other reasons) may only be considered for non-compliance with a guideline that MISRA has classified as Required.
---
Posted by and on behalf of
the MISRA C Working Group

Post Reply

Return to “MISRA Compliance discussions”