You can change the basic properties of existing static analysis rules, such as name, severity, category, and ID, to help you achieve your organization's development policies and goals. For example, you can create new rule categories specifically for your company, such as "Company Standards" or "Company Safety Rules," and remap the rules shipped with DTP to these new categories. You can also change the rule severities to target specific constructs. When rule properties are modified, the rule is considered "mapped" in DTP.
You must be an administrator or team leader to modify the rule properties. See User Administration for additional information.
You can remap rule properties in DTP Engines so that the local analysis executes the custom rules (see DTP Engines manuals for details). You can also centralize rule property modifications in DTP so that DTP Engines connected to DTP server will use them.
Editing Rule Properties
- Choose Test Configurations from your user profile drop-down menu.
- Click on a DTP Engine node in the sidebar and click the Rule Customization tab.
- Choose a Rule Map from the drop-down menu or click Create New Rule Map. The rule map stores the basic properties of existing static analysis rules, such as name, severity, category, and ID. See Rule Maps for additional information.
- Click the Rule Customization tab and locate the rule you want to customize. You can filter rules by typing in the search field or by enabling the Clones, Modified, or Custom filters.
- Click on the rule in the table to view the rule properties and documentation.
- You can perform the following actions in the Rule Properties panel:
- Click in the Rule ID field to edit rule ID.
- Click in the Rule field to edit the rule name.
- Choose a severity from the Severity drop-down menu to change the severity of the rule.
- Click the [Edit Categories] link to open the Rule Categories editor. See Editing Rule Categories.
- Click Clone to create a duplicate of the rule. Cloned rules use the same internal logic as the original rule. Use this option to customize rule properties while preserving the properties of the original rule. Cloned rules automatically appear in all test configurations and can be activated for execution (see Configuring Test Configurations).
When you change rule properties, the original values are also displayed. You can click Default to reset the rule properties to their original values.
Click Save to save any changes you made to the rule.
Editing Rule Categories
You can change the category a rule belongs to in the Rule Categories editor. Click the [Edit Categories] link in the Rule Properties panel to open the editor.
You can perform the following actions:
- Choose a category and click the Assign button to assign the rule being edited to the selected category. Click Save in the Rule Properties panel to preserve the change.
- Click on a category name to activate the field and edit the category name.
The category name is saved after leaving the text field.
Changing the category name affects all the rules in this category.
You can click the revert button to reset the category name.
- Click New to define a new category.
- Click the delete button to delete the selected rule category. Only custom categories created in the overlay can be deleted.
After you have modified the rule properties in the rule map, the rule changes are applied to all test configurations associated with the rule map. See Associating Test Configurations with Rule Maps for details.