Objective
Customize the rules that are checked by a preconfigured test configuration.
C/C++test ships with over 1000 coding standards, which can be easily customized into user-specific sets. The RuleWizard module helps you create custom analysis rules or modify existing rules that are more applicable to your project. In most cases, teams configure their own coding standards sets and create sets specific to each project.
A custom configuration with a user-specific set of coding standards can be created by copying a built-in configuration and making the appropriate changes.
- Select Parasoft> Test Configurations.
- Select User-Defined> Parasoft’s Recommended Rules.
- In the Name field, replace the current name with
<Your_Organization> Standards
(e.g.ACME Standards
). - Click Apply.
- Click the Static tab and verify that the Enable Static Analysis option is selected.
- Expand a rule category in the Rules Tree tab to explore the rules. Rules can be enabled individually, by category or by severity.
- Expand the Coding Conventions category
- Right click the Local variables should not use the same names as member variables [CODSTA-44-1] rule node and select View Rule Documentation.
The built-in knowledge base will launch and open to the documentation for the rule so you can determine if you want to include the rule in your Test Configuration set. Exit the documentation when ready to continue. - Right-click the Coding Conventions for C++ [CODSTA-CPP] directory in the Rules Tree tab and select Enable rules> Enable All.
You can also right-click on a rule and select Disable rules to disable individual rules or categories, as well as enable rules based on severity.