Skip to Main Content Skip to Search
Product Documentation

About Checking Compliance with Coding Rules Tutorial

Overview

Polyspace software allows you to analyze code to demonstrate compliance with established C or C++ coding standards (MISRA C 2004, MISRA C++:2008, or JSF++:2005).[1]

Applying coding rules can both reduce the number of orange checks in your verification results, and improve the quality of your code. Coding rules are the most efficient way to reduce orange checks.

To check compliance with coding rules, you set an option in your project and then run a verification. Polyspace software finds the violations during the compile phase of a verification. When you have addressed all coding rule violations, you run the verification again.

For more information on the coding rules checker, see Checking Coding Rulesin the Polyspace Products for C/C++ User's Guide

In this tutorial, you learn how to:

  1. Create a second verification within your project.

  2. Set an option for checking MISRA C compliance.

  3. Select MISRA C rules to check.

  4. Run a verification with MISRA C checking.

  5. View coding rules violations using the Coding Rules perspective.

Before You Start

For this tutorial, you check the MISRA C compliance of the file example.c, using the project that you created in Setting Up a Polyspace Project.


[1] MISRA and MISRA C are registered trademarks of MISRA Ltd., held on behalf of the MISRA Consortium.

  


 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS