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.

  1. Select Parasoft> Test Configurations.
  2. Select User-Defined> Parasoft’s Recommended Rules.
  3. In the Name field, replace the current name with <Your_Organization> Standards (e.g. ACME Standards).



  4. Click Apply.
  5. Click the Static tab and verify that the Enable Static Analysis option is selected.
  6. Expand a rule category in the Rules Tree tab to explore the rules. Rules can be enabled individually, by category or by severity.
  7. Expand the Coding Conventions category
  8. 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.
  9. 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.

  • No labels