Applying a Preset Filter
You can apply a preset filter to the text-formatted contents of the Defect Log that is displayed at the command line or to the interactive XML-formatted Defect Log. When you apply a preset filter, only the warnings that are included in the filter appear in the Defect Log. All other warnings are hidden.
For a list of preset filters, see List of Preset Filters.
To apply a preset filter to an open Defect Log:
In a build environment window, navigate to the directory in which you ran PREfast for Drivers.
Use a PREfast View command to open a Defect Log.
Click Filter.
From the Presets drop-down list, select a filter.
The following screen shot shows the items on the Presets list.
Click Apply.
The following screen shot shows what happens when you apply a preset filter to a Defect Log. In this example, applying the drivers_recommended filter hides all instances of warnings that are not included in the drivers_recommended filter, including Warnings 6001, 6011, 6014, and 6031.
To apply a preset filter to warnings displayed at the command line:
In a build environment window, navigate to the directory in which you ran PREfast for Drivers.
At the command line, type a PREfast List command that includes the /FilterPreset parameter. For example:
prefast /FilterPreset=PresetName list
To apply a preset filter while opening a Defect Log:
In a build environment window, navigate to the directory in which you ran PREfast for Drivers.
At the command line, add the /FilterPreset parameter to a PREfast View command. For example:
prefast /FilterPreset=PresetName view
Send comments about this topic to Microsoft
Build date: 5/3/2011