Exporting and importing rules

You can export or import code review rules from the software analysis configuration window into a local rule file. A rule file is required to run the command-line code review application.

Exporting rules to a rule file

About this task

The exported information includes selected rules and their assigned severities. It does not include scope information.

Procedure

To export a set of rules, follow the steps below.

  1. Ensure that the software analysis configuration window is in software analysis configuration mode.
  2. In the navigation pane, which is on the left side of the window, select a software analysis configuration.
  3. On the Rules tab. Select the check boxes beside the rules that you want to export and then click Export. You can select domains, categories, and individual rules.
  4. Follow the instructions in the wizard to export the rules to a file on the workstation. The file must have the extension .dat.

Results

The exported rules are written into the specified file.

Importing rules from a rule file

About this task

The imported information includes a group of rules and their assigned severities. It does not include scope information.

Procedure

To import a set of rules, follow the steps below.

  1. Ensure that the window is in software analysis configuration mode.
  2. In the navigation pane, which is on the left side of the window, select an analysis configuration.
  3. On the Rules tab, click Import.
  4. Follow the instructions in the wizard to import the rules. The file must have the extension .dat.

Results

The rules in the rule file are imported into the selected analysis configuration. An imported rule overwrites an existing rule of the same name.

Feedback