This topic explains how to configure a reference report to baseline static analysis results.
C/C++test can identify tasks detected in the current analysis run by comparing them against a baseline report. This allows you to exclude existing tasks from the current report in order to focus on most recently detected code defects.
The process involves two major steps:
- Generating the reference report file using C/C++test's command line interface.
- Using the reference report as a baseline to exclude pre-existing tasks from the current report. The report will only include tasks detected in the current run.
Generating a Reference Report File
You can generate a reference report.xml file by running analysis from the command line interface:
Configure the following setting in your localsettings file (see Configuring Localsettings):
- Run the analysis from the command line (see Testing from the Command Line Interface). The reference report file will be created in the location you configured with the
Using the Reference Report to Filter Out Pre-existing Findings
To use the reference report as a baseline when performing analysis, you need to configure advanced report settings in an advanced settings file–a file that allows you to specify additional settings that cannot be configured in the regular settings used for command line testing. See Configuring an Advanced Settings File for information about creating an advanced settings file and passing its location to C/C++test.
Create an advanced settings file that includes the following C/C++test's advanced settings:
- Specify the path to the advanced settings. See Configuring an Advanced Settings File.
When you run static analysis, the report will only include tasks detected during the current run.