Page tree

Skip to end of metadata
Go to start of metadata

This topic explains how to configure a reference report to baseline static analysis results.

Overview

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:

  1. Generating the reference report file using C/C++test's command line interface.
  2. 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:

  1. Configure the following setting in your localsettings file (see Configuring Localsettings):

    report.ref.report.file=path/to/report.xml
  2. 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 report.ref.report.file setting.

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.

  1. Create an advanced settings file that includes the following C/C++test's advanced settings:

    goal.ref.report.file=[PATH or URL]      //Specifies the path or URL to a reference report.xml file
    goal.ref.report.findings.exclude=true   //Enables excluding existing findings from the current report.
  2. 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.

  • No labels