Check AUTOSAR C++ 14 (-autosar-cpp14
)
Check for violations of AUTOSAR C++ 14 rules
Description
This option affects Bug Finder only.
Specify whether to check for violations of AUTOSAR C++ 14. Each value of the option corresponds to a subset of guidelines to check.
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
-autosar-cpp14
. See Command-Line Information.
Why Use This Option
Use this option to specify the subset of AUTOSAR C++ 14 rules to check for1 .
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 AUTOSAR C++ 14 rules supported by Polyspace.
See AUTOSAR C++14 Rules.
required
Check for violations of required rules.
These rules are mandatory requirements placed on your code. This categorization of rules comes from the AUTOSAR C++14 guidelines.
automated
Check for violations of automated rules.
You can automatically enforce these rules by means of static analysis. This categorization of rules comes from the AUTOSAR C++14 guidelines.
Note that all rules in the
required
category might not be present in theautomated
category. For rules that AUTOSAR C++14 considers as non-automated, Bug Finder shows only a subset of actual rule violations.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
Source code language (-lang)
toCPP
orC-CPP
.
Command-Line Information
Use the command -autosar-cpp14
in the command line to check for
violations of AUTOSAR C++ 14 rules.
Parameter:
-autosar-cpp14 |
Value:
all | required | automated
| 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 AUTOSAR C++ 14 rules through a checkers
activation XML file. See Checkers activation file
(-checkers-activation-file)
.
See Also
1 The Polyspace checkers for AUTOSAR C++14 rules supports AUTOSAR C++14 release 18-10 (October 2018). Out of 397 rules from the standard, 308 rules are supported.