Generate results for sources and (-generate-results-for
)
Specify files on which you want analysis results
Description
This option affects a Bug Finder analysis only.
Specify files on which you want analysis results.
By default, results appear on source files and header files in the same folder as the
source files. You can use this option to see results in other header files. If you use
the option Do not generate results for
(-do-not-generate-results-for)
to suppress entire folders, you can use
this option to unsuppress some subfolders or files in those folders.
Set Option
User interface (desktop products only): In your project configuration, the option is on the Inputs & Stubbing node.
User interface (Polyspace Platform, desktop products only): In your project configuration, the option is on the Static Analysis tab on the Defects and Coding Standards node.
Command line and options file: Use the option
-generate-results-for
. See Command-Line Information.
Why Use This Option
Use this option to see results in header files that are most relevant to you.
For instance, by default, results are generated on header files that are located in the same folder as the source files. Often, other header files belong to a third-party library. Though these header files are required for a precise analysis, you are not interested in reviewing findings in those headers. Therefore, by default, results are not generated for those headers. If you are interested in certain headers from third-party libraries, change the default value of this option.
Note that in Polyspace as You Code, you cannot see results in headers
#include
-d through a source file at all.
The default behavior is to consider the headers in the same folder as the source
file (or subfolders) for analysis but suppress results found in the headers. You can
use this option only to expand the scope of which headers are considered during
analysis. See also Analysis Scope of Polyspace as You Code (Polyspace Access).
Settings
Default: source-headers
source-headers
Results appear on source files and header files in the same folder as the source files or in subfolders of source file folders.
The source files are the files that you add to the Source folder of your Polyspace® project (or use with the argument
-sources
at the command line).all-headers
Results appear on source files and all header files. The header files can be in the same folder as source files, in subfolders of source file folders or in include folders.
The source files are the files that you add to the Source folder of your Polyspace project (or use with the argument
-sources
at the command line).The include folders are the folders that you add to the Include folder of your Polyspace project (or use with the argument
-I
at the command line).custom
Results appear on source files and the files that you specify. If you enter a folder name, results appear on header files in that folder (and its subfolders).
Click to add a field. Enter a file or folder name.
Tips
Use this option in combination with appropriate values for the option
Do not generate results for (-do-not-generate-results-for)
.If you choose
custom
and the values for the two options conflict, the more specific value determines the display of results. For instance, in the following examples, the value for the option Generate results for sources and is more specific.Generate results for sources and Do not generate results for Final Result custom
:C:\Includes\Custom_Library\
custom
:C:\Includes
Results are displayed on header files in C:\Includes\Custom_Library\
and its subfolders but not generated for other header files inC:\Includes
.custom
:C:\Includes\my_header.h
custom
:C:\Includes\
Results are displayed on the header file my_header.h
inC:\Includes\
but not generated for other header files inC:\Includes\
and its subfolders.Using these two options together, you can suppress results from all files in a certain folder but unsuppress select files in those folders.
If you choose
all-headers
for this option, results are displayed on all header files irrespective of what you specify for the option Do not generate results for.You can also show results or suppress results display from groups of files using the option
-classification
. This option allows you to define file sets and attach behaviors to these file sets. If you specify the following behavior for all files in a file set, you have the same effect as using the option-generate-results-for
on the files:The option<show-results value="true"/>
-classification
supports specifying wildcard characters such as?
and*
to specify file and folder patterns. For more information, see:
Command-Line Information
Parameter: -generate-results-for |
Value:
source-headers |
all-headers |
custom=
|
custom= |
Example (Bug Finder):
polyspace-bug-finder -lang c -sources |
Example (Code Prover):
polyspace-code-prover -lang c -sources |
Example (Bug Finder Server):
polyspace-bug-finder-server -lang c
-sources |
Example (Code Prover Server):
polyspace-code-prover-server -lang c -sources
|
Version History
Introduced in R2016a