Check SEI CERT-C++ (-cert-cpp)

Check for violations of CERT C++ rules

Description

This option affects Bug Finder only.

Specify whether to check for violations of CERT® C++ rules.

Set Option

User interface (desktop products only): In your project configuration, the option is on the Coding Standards & Code Metrics node. See Dependencies for other options that you must also enable.

Command line and options file: Use the option -cert-cpp. See Command-Line Information.

Why Use This Option

Use this option to specify the subset of CERT C++ rules to check in your code.

After analysis, the Results List pane lists the coding standard violations. On the Source pane, for every coding standard violation, Polyspace® assigns a symbol to the keyword or identifier relevant to the violation.

Settings

Default: all

all

Check for violations of all CERT C++ rules supported by Polyspace.

See CERT C++ Rules.

from-file

Specify an XML file where you configure a custom selection of checkers for this coding standard. To create a configuration file, click , then select the rules you want to check for this coding standard from the right pane of the Findings selection window. Save the file.

To use or update an existing configuration file, in the Findings selection window, enter the full path to the file in the field provided or click Browse.

If you set the option to from-file, enable Set checkers by file (-checkers-selection-file).

Dependencies

  • This option is available only if you set Source code language (-lang) to CPP or C-CPP.

    For projects with mixed C and C++ code, the SEI CERT-C++ checker analyzes only .cpp files.

Command-Line Information

Parameter: -cert-cpp
Value: all | from-file |
Example (Bug Finder): polyspace-bug-finder -lang cpp -sources file_name -cert-cpp all
Example (Bug Finder Server): polyspace-bug-finder-server -lang cpp -sources file_name -cert-cpp all