Main Content

Software Quality Objective Subsets for MISRA Coding Standards

Some MISRA™ coding rules help address design issues in your code. Polyspace® groups these rules into two subsets:

  • Software quality subset 1 (SQO1) — These coding rules correspond to Polyspace Bug Finder™ quality objective level 1. These rules are classified to be of the highest importance in the standards.

  • Software quality subset 2 (SQO2) — These coding rules correspond to Polyspace Bug Finder quality objective level 5. This subset includes the coding rules in SQO1 and other advisory coding rules that can help reduce design issues in your code.

For details about quality objective levels in Polyspace, see Evaluate Polyspace Bug Finder Results Against Bug Finder Quality Objectives

To use the coding rules belonging to SQO1 and SQO2, you can use either the Polyspace user interface or the command line.

Select Software Quality Objective Subsets

When running a Polyspace analysis, select software quality objective (SQO) subsets either using the Polyspace user interface or the command line interface.

To select SQO subsets using the Polyspace user interface:

  1. In the Configuration pane of the Polyspace desktop user interface, locate the Coding Standards and Code Metrics node. Select Set checkers by file and click open.

  2. In the Checkers Selection window, click New to create a new checkers file. Optionally, clear the coding rules that are already selected.

  3. Select a MISRA coding standard.

  4. Select the check box SQO Level 1 to select the rules in the SQO1 subset. Alternatively, select the check box SQO Level 2 to select the rules in the SQO2 subset.

  5. Save your selection as an XML file.

You can use the saved XML file to activate coding rules from the SQO subsets in subsequent Polyspace Bug Finder analysis.

Alternatively, to select the SQO subsets when running a Polyspace Bug Finder analysis at the command line, specify one of SQO-subset1 or SQO-subset1 when using the MISRA coding standards. For example: -misra2 SQO-subset1, -misra3 SQO-subset1, -misra-c-2023 SQO-subset1:

Review results For Specific Software Quality Objective Subset

After running a Polyspace analysis, you can choose to review violations that block a specific SQO. After running an analysis, review the results either using the Polyspace user interface or the Polyspace Access™ web interface.

In the Polyspace user interface, you can use review scopes to limit the scope of your results review to specific SQO subset:

  1. Open the Review Scope tab of the Preferences window by clicking Tools > Preference.

  2. Select Include Quality Objectives Scopes.

  3. To limit the scope of your review to MISRA coding rules from SQO1, select the review scope SQO-4. Alternatively, to limit the scope of your review to MISRA coding rules from SQO2, select SQO-5.

  4. Click OK and close the Preference window

After defining your review scope, the Results List pane shows the results that are included in the review scope.

In the Polyspace Access web interface, you can filter the results based on software quality objectives. See Monitor Code Quality Using Quality Objectives Dashboard in Polyspace Access (Polyspace Access).

See Also

| | |

Related Topics