Misra Rules for cppcheck

Questions and discussions about MISRA C not fitting under migration or rules forums

Moderators: misra-c, david ward

Post Reply
julred
Posts: 3
Joined: Mon Nov 02, 2020 7:04 am
Company: Emerson

Misra Rules for cppcheck

Post by julred » Wed Nov 04, 2020 5:58 am

Hi everyone,

I'm using the application cppcheck for my existing development. Now I'd like to add the functionality of checking my sources against Misra rules.
Therefor I need the Misra Rules in a .txt file format. Where can I get it?

BR

julred
Posts: 3
Joined: Mon Nov 02, 2020 7:04 am
Company: Emerson

Re: Misra Rules for cppcheck

Post by julred » Fri Dec 04, 2020 6:30 am

Anyone who can support me?

david ward
Moderator
Moderator
Posts: 509
Joined: Wed May 05, 2004 9:05 am
Location: MIRA

Re: Misra Rules for cppcheck

Post by david ward » Mon Dec 07, 2020 5:15 pm

Please see this topic for general guidance on open source checkers viewtopic.php?f=56&t=1189

Depending on your organization, MISRA can provide you with a license to use the rules internally in this way. Please contact us directly to discuss.
Dr David Ward
MISRA Project Manager

julred
Posts: 3
Joined: Mon Nov 02, 2020 7:04 am
Company: Emerson

Re: Misra Rules for cppcheck

Post by julred » Fri Jan 29, 2021 11:12 am

Thanks for posting this link.

In general I'm looking for the raw rules text.
The tool I'd like to use has the following CLI parameter:
python misra.py --rule-texts=<path-to-rule-texts> main.cpp.dump

I only have the following documents:
MISRA Compliance:2020 Achieving compliance with MISRA Coding Guidelines, February 2020
MISRA C:2012 Amendment 2 Updates for ISO/IEC 9899:2011 Core functionality, February 2020

Where do I get the correct rules text, which are functional with cppcheck?

MISRA Reply
Posts: 53
Joined: Mon Dec 06, 2004 12:24 pm

Re: Misra Rules for cppcheck

Post by MISRA Reply » Fri Jan 29, 2021 12:18 pm

Your starting point would be to buy a copy of MISRA C from our webstore. The document contains further explanation of the rules which will help you in understanding tool messages.

If you want to use the rule text in some other way we would need to understand whether this was for personal use only or within a workgroup. Please contact us to discuss your requirements in more detail.

Post Reply

Return to “General Questions”