Main Content

Coding Rule Subsets Checked Early in Analysis

Note

Starting in a future release, Code prover will not support checking coding rules. Migrate to Bug Finder for checking coding rules. See Coding Rule Subsets Checked Early in Analysis.

In the initial compilation phase of the analysis, Polyspace® checks the coding rules that do not require the run-time error detection part of the analysis. If you want only those rules checked, you can perform a much quicker analysis.

The software provides predefined subsets of rules that it checks earlier in the analysis. These subsets are available with the options Check MISRA C:2004 (-misra2), Check MISRA AC AGC (-misra-ac-agc), Check MISRA C:2012 (-misra3), and Check MISRA C:2023 (-misra-c-2023).

ArgumentPurpose
single-unit-rules

Check rules that apply only to single translation units.

If you detect only coding rule violations and select this subset, a Bug Finder analysis stops after the compilation phase.

system-decidable-rules

Check rules in the single-unit-rules subset and some rules that apply to the collective set of program files. The additional rules are the less complex rules that apply at the integration level. These rules can be checked only at the integration level because the rules involve more than one translation unit.

If you detect only coding rule violations and select this subset, a Bug Finder analysis stops after the linking phase.

To see the coding rules from various MISRA standards that belong in these subsets:

  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. Alternatively, use the command polyspace-checkers-selection in the command-line.

  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 C™ coding standard.

  4. To select system decidable coding rules, select Decidable. Alternatively, to select single unit coding rules, select Single Unit.

  5. Save your selection as an XML file.

The content of the XML file lists coding rules that are checked early in the analysis.

See Also

| |

Related Topics