Example: Filtering and excluding a directory
In this example, a filter is created that only shows findings that contain Microsoft™ include files. This filter is then used to narrow down the list of findings (we will exclude all findings that match the filter).
Procedure
- In the Directory section of the Filter Editor view, add the path to the Microsoft™ include files (for example, C:\Program Files\Microsoft Visual Studio 8\VC\include).
- Select Restrict to to make this an inclusive rule.
- On the Findings view toolbar, click Show findings that do not match the filter to see only findings for Microsoft™ header files. This allows you to see what the scan results will look like after applying the filter's inverse globally and scanning again.
- Save the filter with a name, such as MS Includes.
- Return to the Configuration perspective and, in the Explorer view, select the C/C++ application or project.
- If an application is selected, open the open the Exclusions and Filters tab of the Properties view. If a project is selected, open the Filters tab of the Properties view. Click Add. Select MS Includes and then select Invert filter.
- Save the changes in the Properties view and then scan the application or project again.
- Return to Triage. The findings in the exclusion appear in the Excluded Findings view.