Creating a resource filter for a rule
You can specify files to exclude from a code review. This provides a way to exclude files that cannot be audited, or that are not ready to be reviewed, at the time when the rest of the files in the code base are ready for review. To exclude files from a code review, you create a resource filter.
Note: To exclude files from being reviewed by deep J2EE rules, which not only produce findings but also show the paths that lead to the findings, use the Excluded page. The deep rules require data flow analysis, the method that traces the paths to a finding. They recognize only the files on the Excluded page. For details, see “Excluding packages and classes from the Complete code review.”
To create a resource filter for a rule:
- Click Window > Show View > Other, expand Java, select Code Review, and click OK. The Code Review view opens.
- Click Window > Preferences. The Preferences window opens, showing the Code Review page.
- In the left pane, expand Java, then select Code Review.
- In the Select Code Review list, select Complete Code Review and then click the rule you want to create a resource filter for.
- In the series of tabs below the list of rules, click the Resource Filters tab where you can perform any of the following tasks:
- Click Add to add a file as a filter for a rule. In the Configure properties window, type the file name in the Resource Name field or click Browse to select a file from the Select File list.
- Click Remove to remove the file from the filter list. In the Confirm remove window click Yes.
- Click Edit to edit the resource name. In the Configure properties window, type the file name in the Resource Name field or click Browse to select a file in the Select File list.
Parent topic
Configuring code review rules