Creating and exporting rule files or defined rule sets for software analyses

Use the Rules tab to create and then save and export an analysis rule file.

Before you begin

About this task

When you run a software analysis from a command line, you specify a rule file as input. The rule file contains a set of rules that developers can share to consistently apply rules to source code. Defined rule sets contain rules that are targeted for a specific purpose, such as globalization. Instead of searching through rules to select rule categories and rules, you can select a defined rule set that has preselected rules.

To create and export a rule file:


  1. Click Run > Analysis.
  2. In the Software Analyzer window, on the toolbar, click New.
  3. Optional: A default name for the analysis configuration is provided. To save the rule file or modify it later, assign it a unique name.
  4. Click the Rules tab.
  5. Complete one of the following steps:
    • To export rule categories and individual rules, expand the Analysis Domains and Rules list and select the rules to include in the rule file. To view the configuration information for a rule, or to change the severity rating and other rule parameters, click the rule to display its properties.
    • To export a defined rule set, from the Rule Sets list, select a rule set. To display the selected rules for the defined rule set, click Set.
  6. Click Export and, in the File name field, type a name for the rule file.
    Note: The default extension for the rule file is .dat.
  7. Specify a location to save the rule file and click Save.
    Note: Do not save the rule file in the installation path; if you upgrade or reinstall the product, the rule file might be deleted.

What to do next