MISRA Discussion Forums
How to deal mandatory rules in the MISRA compliance 2016? - Printable Version

+- MISRA Discussion Forums (https://forum.misra.org.uk)
+-- Forum: MISRA Compliance (https://forum.misra.org.uk/forumdisplay.php?fid=23)
+--- Forum: MISRA Compliance discussions (https://forum.misra.org.uk/forumdisplay.php?fid=184)
+--- Thread: How to deal mandatory rules in the MISRA compliance 2016? (/showthread.php?tid=1495)



How to deal mandatory rules in the MISRA compliance 2016? - yohura - 11-07-2019

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 ?


Re: How to deal mandatory rules in the MISRA compliance 2016? - misra-c - 11-10-2019

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.


Re: How to deal mandatory rules in the MISRA compliance 2016? - yohura - 21-01-2020

Thank you for your reply.
I understood that we must never not violate mandatory rules even if they are a part of adopted code.
regards,