| Contents | Index |
| On this page… |
|---|
Polyspace Coding Rules Checker Overview |
Polyspace software can check that your code complies with established C or C++ coding standards. The coding rules checker can check MISRA C, MISRA C++ or JSF++ coding standards.[1]
The Polyspace coding rules checker enables Polyspace software to provide messages when coding rules are not respected. Most messages are reported during the compile phase of a verification.
Note The Polyspace MISRA checker is based on MISRA C:2004, which also incorporates MISRA-C Technical Corrigendum 1 (http://www.misra-c.com). The Polyspace MISRA C++ checker is based on MISRA C++:2008 – "Guidelines for the use of the C++ language in critical systems." For more information on these coding standards, see http://www.misra-cpp.com. The Polyspace JSF C++ checker is based on JSF++:2005. For more information on these coding standards, see http://www.jsf.mil/downloads/documents/JSF_AV_C++_Coding_Standards_Rev_C.doc. |
To check MISRA C compliance, you set an option in your project before running a verification. Polyspace software finds the violations during the compile phase of a verification. When you have addressed all MISRA C violations, you run the verification again.
To set the MISRA C checking option:
In the Configuration pane of the Project Manager perspective, select the All Settings tab.
Expand Compliance with standards.
Select the Check MISRA C rules check box.
Expand the Check MISRA C rules node.

Specify coding rule checker options, for example:
MISRA C rules to check
Files, if any, to exclude from the checking
Data types that you want Polyspace to consider as Boolean
Note For more information on using the MISRA C checker, see Checking Coding Rules. |
To check coding rules compliance, you set an option in your project before running a verification. Polyspace software finds the violations during the compile phase of a verification. When you have addressed all coding rules violations, you run the verification again.
To set the coding rules checking option:
In the Configuration pane of the Project Manager perspective, select the All Settings tab.
Expand the Compliance with standards > Coding rules checker node.
The software displays the coding rules options: -jsf-coding-rules , -misra-cpp, and -includes-to-ignore.

These options allow you to specify which rules to check and any files to exclude from the checker.
Select either the Check JSF C++ rules or Check MISRA C++ rules check box.
Specify which rules to check and which, if any, files to exclude from the checking.
Note For more information on using the coding rules checker, see Checking Coding Rules. |
[1] MISRA and MISRA C are registered trademarks of MISRA Ltd., held on behalf of the MISRA Consortium.
![]() | Specifying Options to Match Your Quality Goals | Setting up Project to Automatically Test Orange Code (C Only) | ![]() |
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |