You can modify the default properties of static analysis rules, such as category, severity, and name by applying a rule map. Rule maps consist of a rulemap.xml file and other configurations set in the DTP UI. You can upload rulemap.xml files and download files that have already been implemented. You can also create new rule maps directly in the UI.

In this section:

Creating New Rule Maps

Before you can customize rule properties or upload custom rules, you must create a rule map. 

  1. Choose Test Configurations from the Report Center settings (gear icon) menu.
  2. Click on the rule map editor (gears) icon in the sidebar and click Create New Rule Map.
  3. Enter the basic rule map information and click Create.
     
  4. Associate test configurations with the rule map by clicking the move (<<) icon in the Available Test Configurations panel to move them to the Associated Test Configurations panel. This enables the test configurations to use the rule map during code analysis. You can dissociate test configuration from the rule map by clicking the move (>>) icon in the Associated Test Configurations panel. 
     
  5. Click the Rule Customization tab and configure the rule map settings. See Customizing Rule Properties for details.
  6. Click Save when finished.

Editing Rule Map Information

  1. Choose Test Configurations from your profile menu to open the test configurations page. 
  2. Click on the rule map editor (gears) icon in the sidebar. 
  3. Choose a rule map file from the Rule Map menu.
     
  4. Click the Rule Map Information tab and make your changes. If you want to preserve the original rule map, you can click Clone and edit the duplicated file.
     
    You can perform the following actions:
    • Change the name of the rule map in the Rule Map Name field.
    • Enter a DTP user in the Owner(s) field to specify a new owner. Ownership allows users to manage rule map files. The username entered will be validated against the user database.
       
    • Enter information about the rule map file in the description field.  
    • Click on the move (>>/<<) icon in the Associated Test Configurations or Available Test configurations field to remove or associate test configurations with the rule map. Associating a test configuration with a rule map allows you to use rule customizations made in the rule map in the selected test configurations. You can mouse over the information icon to see information about a test configuration in a tooltip:
       
  5. Click Save when you are finished making changes.   

Uploading Rule Map Files (rulemap.xml) 

  1. Choose Test Configurations from the settings (gear) menu.
  2. Click on the rule map editor (gears) icon in the sidebar. 
  3. Click the Upload/Download tab and click Select File.
  4. Browse to the file you want to upload and click Upload.

Downloading Rule Map Files (rulemap.xml)

  1. Choose Test Configurations from the settings (gear icon) menu.
  2. Click on the rule map editor (gears icon) icon in the sidebar.
  3. Choose the rule map you want to download from the Rule Map menu and click the Upload/Download tab.
  4. Click Download.

Deleting Rule Maps

The following instructions describe how to delete the entire rule map definition, including the rule mapping file (rulemap.xml) and any custom rules.

  1. Choose Test Configurations from the settings (gear icon) menu.
  2. Click on the rule map editor (gears) icon in the sidebar. 
  3. Choose the rule map you want to delete from the Rule Map menu and click Delete.

About Rule Map Permissions

  • Any DTP user can view the rule map definitions.
  • Only rule map users listed in Owners field (and DTP administrators) can modify the rule map definition.
  • Only DTP administrators and team leaders can create a new rule map.
  • When DTP administrators and team leaders create new rule maps, they are listed in the rule map Owner(s) field. 
  • Owners can add any DTP user, including users that are not team leaders to the Owner(s) field, thereby granting these users permission to manage (save, clone, delete) the rule map.
  • No labels