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.
User interface
(Polyspace Platform, desktop products only):
This option does not exist in the project configuration. Activate checkers by using
the options Use custom
checkers file
and Checkers
activation file (-checkers-activation-file)
.
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 Checkers selection window. Save the file.
To use or update an existing configuration file, in the Checkers selection window, enter the full path to the file in the field provided or click Browse.
If you set the option to
from-file
, enableSet checkers by file (-checkers-selection-file)
.
Dependencies
This option is available only if you set to
CPP
orC-CPP
.For projects with mixed C and C++ code, the SEI CERT-C++ checker analyzes only
.cpp
files.
Command-Line Information
Use the command -cert-cpp
in the command line to check for
violations of CERT C++ rules.
Parameter:
-cert-cpp |
Value:
all | from-file | |
Example (Bug Finder):
polyspace-bug-finder -lang cpp -sources
|
Example (Bug Finder Server):
polyspace-bug-finder-server -lang cpp -sources
|
Alternatively, enable all or specific CERT C++ rules through a checkers activation XML file. See Checkers activation file
(-checkers-activation-file)
.