Configuring code review
An automated code review is a development feature that applies a set of rules to a code base to validate compliance with best development practices and software engineering guidelines. To get the maximum value from code review, development leads can review all the rules in the Complete code review and configure the code review by enabling and categorizing only the rules important for the team.
There are several code reviews that are supplied with the code review feature. In each code review, rules are grouped based on a particular aspect of quality or severity. To configure code review, the development lead uses the Complete code review because it contains a superset of all rule categories. From the Complete code review, the team lead chooses a subset of rules to configure the code review according to the team's needs, exports the configuration and distributes it to all team members.
You perform the following tasks to configure code review:
- Exclude packages and classes from the Complete code review.
- Select the Complete code review.
- Configure code review rules.
- Select rule categories and rules for the Complete code review.
- Create a resource filter for a rule.
- Create a user-defined rule.
- Modify a user-defined rule.
- Import a rule configuration.
- Export a rule configuration.
Each task is described in its own topic.
Excluding packages and classes from the Complete code review
Based on knowledge about an existing code base, a development lead might decide to exclude portions of code from a code review. This usually applies to code that is not directly owned, and therefore cannot be modified, by the development team.Selecting the Complete code review
You must use the Complete code review to configure code reviews, because this code review contains all the available rules. From the supplied code reviews, you select the Complete code review to begin the configuration process.Configuring code review rules
The development lead should review the rules in the Complete code review and decide which rule categories and rules must be applied to the code base.Creating a user-defined rule
In addition to the set of code review rules that are shipped with the product, you can create your own rules based on a set of templates. Each template corresponds to a generic rule with a set of empty parameters for which you supply values. Supplying a set of values creates a new rule from the template that can be shared between team members.
Parent topic
Reviewing code automatically