Main Content

polyspace-bug-finder-access

(DOS/UNIX) Run Polyspace as You Code from Windows, Linux, or other command line

Since R2021a

Description

Note

This Polyspace® command is available in polyspaceroot\polyspace\bin. Here, polyspaceroot is the Polyspace as You Code installation folder, for instance, C:\Program Files\Polyspace as You Code\R2024b (see also Run Polyspace as You Code from Command Line and Export Results). To avoid typing the full path to this command, add this location to the PATH environment variable in your operating system.

polyspace-bug-finder-access -sources sourceFile [options] runs a Polyspace as You Code analysis on the source file sourceFile. You can customize the analysis with additional options.

example

polyspace-bug-finder-access -sources sourceFile -import-comments baselineFolder [options] runs a Polyspace as You Code analysis on the source file sourceFile and then imports the review information from a previous run stored in baselineFolder. See -import-comments (Polyspace Bug Finder).

Use this workflow to compare your results against the results of a previous run that you download from Polyspace Access and focus on new results only or on unreviewed results. See Set Baseline Polyspace as You Code Results on Command Line.

polyspace-bug-finder-access -sources sourceFile -options-file optFile runs a Polyspace as You Code analysis on the source file sourceFile with the options specified in the option file. When you have many analysis options, an options file makes it easier to run the same analysis again.

example

polyspace-bug-finder-access -h[elp] lists a summary of possible analysis options.

Examples

collapse all

Run the polyspace-bug-finder-access command by specifying all options directly at the command line.

Run the polyspace-bug-finder-access command on a single source file file.c in the current folder. Save the results in the folder polyspaceResults.

polyspace-bug-finder-access -sources file.c -results-dir polyspaceResults

Run the polyspace-bug-finder-access command by specifying options in a text file.

Enter the following in a text file opts.txt:

-results-dir polyspaceResults
-compiler gnu7.x

Run the polyspace-bug-finder-access command on a single source file file.c in the current folder. Use the analysis options in the previously created file opts.txt:

polyspace-bug-finder-access -sources file.c -options-file opts.txt

Input Arguments

collapse all

C or C++ source file name, specified as a string. If the file is not in the current folder (pwd), sourceFile must include a full or relative path. To avoid errors because of paths with spaces, add quotes " " around the path. For more information, see -sources (Polyspace Bug Finder).

Note that you can only analyze a single source file at a time using Polyspace as You Code.

Example: myFile.c

Analysis options and their corresponding values, specified by the option name and if applicable value. For syntax specifications, see the individual analysis option reference pages (Polyspace Bug Finder).

Example: -lang C-CPP -compiler diab

Text file listing analysis options and values, specified as a string. If the file is not in the current folder (pwd), optFile must include a full or relative path. To avoid errors because of paths with spaces, add quotes " " around the path. For more information, see -options-file (Polyspace Bug Finder).

Example: opts.txt, "C:\ps_analysis\options.txt"

Path of folder where you store the run that you download from Polyspace Access. You use the downloaded run as a baseline for Polyspace as You Code runs. See Set Baseline Polyspace as You Code Results on Command Line.

Example: "C:\Temp\Results_Folder\baseline"

Version History

Introduced in R2021a