polyspace-bug-finder
(System Command) Run a Bug Finder analysis on Windows, Linux, or other command line
Syntax
Description
The polyspace-bug-finder system command runs a Polyspace®
Bug Finder™ analysis at the command line using analysis options specified as command-line flags or using an options file.
Note
This Polyspace command is available in . Here, polyspaceroot\polyspace\bin is the Polyspace installation folder, for instance, polyspacerootC:\Program Files\Polyspace\R2026a (see also Installation Folder). To avoid typing the full path to this command, add this location to the PATH environment variable in your operating system.
polyspace-bug-finder [ runs a Bug Finder analysis if your current folder contains a options]sources subfolder with source files (.c or .cxx files). Bug Finder analyzes the source files in the sources folder and its subfolders.
polyspace-bug-finder -sources runs a Bug Finder analysis on the source file(s) sourceFiles [options]sourceFiles. You can customize the analysis with additional options.
polyspace-bug-finder -sources-list-file runs a Bug Finder analysis on the source files listed in the text file listOfSources [options]listOfSources. You can customize the analysis with additional options. Using a sources list file is recommended when you have many source files spread over multiple folders. By keeping the list of sources in a text file, you can control the scope of your analysis and add
sources to the analysis without moving the source files to the sources folder.
polyspace-bug-finder -h[elp] lists a summary of possible analysis options.
Examples
Input Arguments
Tips
If you run the command as part of a script, check the exit status to confirm a successful analysis. The command returns zero on a successful analysis. A nonzero return value means that the analysis failed and was not completed. For instance, if the analyzed file does not compile, the command returns a nonzero value. If some of the files do not compile when you are analyzing multiple files, the command completes analysis on the files that do compile and returns zero. It is possible to
stop analysis if a file does not compile. See Stop analysis if a file does not compile (-stop-if-compile-error).
After running the command, you can check the %ERRORLEVEL% variable in Windows® command line to confirm a successful analysis.
Version History
Introduced in R2013b