Main Content

Set Baseline Polyspace as You Code Results in Eclipse

For more efficient bug fixing, you can baseline the results of a Polyspace as You Code analysis with previous results. When you baseline the results, you compare them against the results of a previous run and focus on new results only or on unreviewed results only. You baseline Polyspace as You Code results using previous Polyspace® Bug Finder™ Server™ results that you download from Polyspace Access™.

Note

To keep using the most up-to-date baseline information, make sure that you periodically run the command to download results from Polyspace Access. See Step 3: Download Baseline.

Results that appear in Polyspace Access act as baseline for a Polyspace as You Code analysis.

What Baseline Results Look Like

If you baseline Polyspace as You Code results using Polyspace Bug Finder Server results that you downloaded from Polyspace Access, you can see the following benefits:

  • Results that have a justified Status on Polyspace Access (No Action Planned, Justified, or Not a Defect) are no longer shown.

  • Results that have a non-justified Status on Polyspace Access carry over all review information to the Polyspace Results List pane in Eclipse™. If a result is reviewed in Polyspace Access and marked as such, one of the following is true:

    • The Status is different from Unreviewed.

    • The Severity is different from Unset.

    • The Comment is not blank.

  • If you specify the Polyspace as You Code plugin setting Show only new findings compared to the results baseline, you see only results that are new in the current run. That way, you can only focus on results that explicitly occurred because of the changes you made since the last Polyspace Server run.

Setting Baseline Steps

To use Polyspace Bug Finder Server results as baseline for a Polyspace as You Code analysis, follow the steps below. Once a baseline is downloaded, if you choose to point to the baseline, each subsequent run, whether on file save or on-demand, uses the baseline.

Step 1: Identify Project to Use as Baseline

First, identify a project in Polyspace Access that you want to use as baseline. The project must contain results of a Polyspace Bug Finder Server analysis on files that you will analyze in Polyspace as You Code.

Copy the path to the project for use in the Visual Studio Code extension settings. To copy this path:

  1. Open the Polyspace Access web interface in a web browser.

  2. On the Project Explorer pane, right-click the project and select Copy Project Path to Clipboard.

Right-click option to copy project path

Step 2: Refer to Project from Polyspace as You Code

Next, refer to the Polyspace Access project from the Polyspace as You Code plugin settings in Eclipse.

  1. Go to Window > Preferences and select the Polyspace as You Code node.

  2. On the Baseline node configure these settings:

    • Show Baseline Information: Select an option from the dropdown.

      • Show local findings only — Do not use the baseline.

      • Show local findings and baseline info — After you download a baseline, findings that are already justified in the baseline run are suppressed in the Polyspace Problems view.

      • Show new findings only — After you download a baseline, findings that are already present in the baseline run are suppressed in the Polyspace Problems view. Use this option to focus on only new findings in your file.

    • Polyspace Access URL: The URL of the server that hosts Polyspace Access. For instance, https://my-access-url:9443/.

    • Polyspace Access Login: The username that you use to log in to Polyspace Access.

    • Project path: The path to the project in Polyspace Access that you want to use as baseline. You previously copied this path from the Polyspace Access web interface.

Step 3: Download Baseline

Explicitly download the Polyspace Access result to use as baseline.

  1. The first time you configure the plugin settings, click Download baseline button in the Baseline view of the Polyspace as You Code perspective.

    Click the same icon to download an updated baseline. The icon is available only if you configure the plugin to use a baseline.

  2. The plugin prompts you to enter your Polyspace Access password. You have the option to save the password so that you don't need to enter it in subsequent downloads.

An indicator in the Baseline view shows the progress of the download. If there are issues with the download, check the Console output.

After download, subsequent runs use the baseline. To disable baseline usage, set the Show Baseline information setting to Show local findings only.

Related Topics