Set Baseline Polyspace as You Code Results in Eclipse
For more efficient bug fixing, you can create a local baseline or download a previous Polyspace Bug Finder analysis from Polyspace® Access™ to use as a baseline. You can compare your Polyspace as You Code single-file analysis results against your local baseline or Polyspace Access baseline and focus your review on new results or unreviewed results only.
Baselines contain only results from the Polyspace version used to perform the analysis. For example, a baseline from an earlier version of Polyspace might not contain the same results as an analysis from a later version. Polyspace as You Code displays a warning if you are using a baseline from a different version of Polyspace. You cannot use the results of a Polyspace Code Prover™ analysis as a baseline in Polyspace as You Code.
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.
Configure Local Baseline
To create a local baseline, right-click a file in the Project Explorer view or right-click in the editor and select Create a local baseline. You can also create a local baseline by right-clicking a file in the Quality Monitoring view and selecting Create a local baseline.
When you create a local baseline for a file, Polyspace analyzes the file and uses the analysis results as a baseline. The results of each subsequent analysis of the file are compared against the baseline.
For more information on interacting with baselines in Eclipse™, see Open Polyspace as You Code Perspective.
Configure Polyspace Access Baseline
To use Polyspace Bug Finder™ Server™ results as baseline for a Polyspace as You Code analysis, follow these steps. If you choose to point to a downloaded baseline, each subsequent run uses the baseline.
Step 1: Identify Project to Use as Baseline
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 Eclipse extension settings. To copy this path:
Open the Polyspace Access web interface in a web browser.
On the Project Explorer pane, right-click the project and select Copy Project Path to Clipboard.
Step 2: Point to Project from Polyspace as You Code
Point to the Polyspace Access project from the Polyspace as You Code plugin settings in Eclipse.
Go to Window > Preferences and select the Polyspace as You Code node.
On the Baseline node configure these settings:
Select an option from the Show Baseline Information dropdown.
Show all findings
— Shows all findings. Findings that are already justified in the baseline run are suppressed in the Polyspace Problems view.Show only new findings compared to the baseline
— 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
Download the Polyspace Access result to use as baseline.
The first time you configure the plugin settings, click
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 Polyspace Access baseline.
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.
Compare Results Against Baseline
When you compare Polyspace as You Code results against a local or Polyspace
Access baseline, by default only results that are new compared to the local
baseline are shown. If you toggle the baseline filter to show all results,
[baseline]
appears next to results that appear in the baseline in
the Problems panel.
In addition, when you use a Polyspace Access baseline:
Results that have a status of
No Action Planned
,Justified
, orNot a Defect
are hidden.Results that have a status of
Unreviewed
,To investigate
,To fix
, orOther
on Polyspace Access carry over all review information to the Result Details view.For example, if a defect has been reviewed and assigned a status of
To investigate
and a severity ofMedium
, the same review information appears in the Comment from baseline section in the Result Details view.If a Polyspace as You Code result also appears in the Polyspace Access baseline, you can open the project that you use as baseline in the Polyspace Access interface. Click the arrow next to
in the Baseline view and select Open project in Access web. See Open Polyspace as You Code Perspective.
If you use both a local baseline and a Polyspace Access baseline, Polyspace compares the current results to the Polyspace Access baseline first, but uses the local baseline to filter for new results.
In order to keep baselines persistent between sessions of Eclipse, Polyspace stores both local and Polyspace
Access baselines in your current working directory. If no path is specified in
the Polyspace as You Code settings, the extension uses the subfolder
polyspace_as_you_code
in your system's temp
folder.