Configuring code review rules

Code Review for C

The code review tool uses a set of predefined rules that you can either disable or set the severity level to Warning or Error.

By default all rules are enabled and produce either an error or a warning in the code review report. You can save multiple customized rule policies.

The default rule policy is located in the <installation directory>/plugins/Common/lib/confrule.xml file.

Note   All new projects use the default rule configuration file. When you make any changes to the policy, a new policy file is automatically saved in the project folder.

To disable or set the severity level of code review rules:

  1. Select a node in the Project Explorer pane and click the Settings button.

  2. In the Configuration Settings list, select Code Review.

  3. Select the Rule configuration setting and click Edit . This opens the Rule Configuration window.

  4. On the left, select the rule that you want to configure. Rules are grouped into categories. When a rule is selected, its description is displayed on the right.

  5. On the right, select the severity level:

  6. Select Show only the first occurrence to only show the first occurrence of a non conformance in a file.

  7. Select OK to save the current configuration or Save As to create a new rule configuration file.

Related Topics

Code review overviewCode review settingsCode review rulesUnderstanding code review reports