polyspace-bug-finder
(DOS/UNIX) Run a Bug Finder analysis from Windows, Linux, or other command line
Syntax
Description
Note
This Polyspace® command is available in
. Here,
polyspaceroot
\polyspace\bin
is the Polyspace installation folder, for instance, polyspaceroot
C:\Program
Files\Polyspace\R2024b
(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). The analysis considers
files in sources
and all subfolders under sources
.
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. By keeping the list
of sources in a text file, the command is shorter and updates to the list are easier.
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