The code review tool uses a set of predefined rules. You can select the default rule
configuration file for the code review tool. MISRA 2004 and MISRA 2012 from IBM® DevOps Test Embedded (Test Embedded) 8.2.0 are the default installed
rule configuration files. You can disable or set the severity level to Warning. You can also
configure the entry-point option if your application is multi-threaded.
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 files
MISRA 2004 and MISRA 2012 are located in: <installation
directory>/plugins/Common/lib/confrule.xml. Do not modify the default
rule configuration files. The only change that can be done in the default rule configuration
files is to change or disable the severity level of the rule. Note: For all new projects, you
must select the configuration file that must be used. When you make any changes to the rule
policy file, you can save the new policy file in the project.
To select the configuration file and disable or set the severity level of code
review rules:
-
In the project explorer, right-click the project on which you want to change the
settings and click Properties. Alternatively, you can select the
project, and then click the settings icon
on the toolbar.
-
Expand C/C++ Build in the left panel, select
Settings.
-
In the right panel, in the Build tab, expand
Settings and select Code Review.
-
Expand Code review to access the code review settings.
![]()

-
Click in the value on the Rule configuration row and click
... to select a rule configuration file.
Note: If your configuration file is an out-of-date version, you are prompted to update it.
Click ok to select the rules that are missing in your
configuration file. The selected rules are added with their default severity levels to
your configuration file. Unselected rules are added to your configuration file as
disabled rules.
-
Select the default MISRA 2004 or MISRA 2012 rule configuration file that are installed
with the product. Alternatively, click + to select a new rule
configuration in your browser.
-
Click OK.
The path to the selected rule configuration is displayed in the value column on the
Rule Configuration line.
-
On the Rule configuration row, click the
to open the Rule Configuration window.

-
In the Rule configuration window, select the rule that you want to
configure.
Rules are grouped into categories. You can filter the rules by labels from the
Find field. Search is not case sensitive.
When a rule is selected, its description is displayed on the right panel with the
parameter description and value if any parameter is available for the selected rule.
-
On the right panel, select the severity level:
-
Disabled: The selected rule is ignored and is not displayed
in the code review report.
-
Warning: When the rule condition is found, a warning is
displayed in the code review report.
-
Error: When the rule condition is found, an error is
displayed in the code review report.
Note: Multiple user-custom rules (from Rule U99.1 to Rule U99.10) can be defined for
MISRA 2004 and MISRA 2012 with their own severity level.
-
Select Show only the first occurrence to only show the first
occurrence of a rule condition in a file. Any subsequent occurrences of the condition are not
reported.
Note: If your application is multi-threaded, you can provide the list of entry points to avoid
that the rules about 'non-used functions' are raised.
To configure the Multi_thread option, follow these steps:
-
In the Project Explorer, right-click the project on which you want
to change the settings and click Properties.
-
Click and select Build Settings.
-
In the right panel, click General > Multi-Thread
option.
-
Click ... in the value field of the Entry
points option to open the editor.
-
In the editor, enter the list of entry points for each thread and click
OK.
-
Click OK, Apply the changes and close the
Properties window.
Note: The Entry point option applies to rule E16.50 (MISRA_2004) and M2.2.2 (MISRA
2012).