Bug Finder and Code Prover report (-report-template
)
Specify template for generating analysis report
Description
Specify template for generating analysis report.
The report template (.rpt
) files are available in the
folder and its subfolders. Here,
polyspaceroot
\toolbox\polyspace\psrptgen\templates\
is the Polyspace® installation folder, for instance, polyspaceroot
C:\Program
Files\Polyspace\R2024b
.
Set Option
User interface (desktop products only): In your project configuration, the option is on the Reporting node. You have separate options for Bug Finder and Code Prover analysis. See Dependencies for other options you must also enable.
User interface (Polyspace Platform, desktop products only): In your project configuration, the options to specify report template are on the Static Analysis tab on the Reporting node. In Polyspace Platform, these options are Report Template (Code Prover) and Report Template (Bug Finder). See Dependencies for other options you must also enable.
Command line and options file: Use the option
-report-template
. See Command-Line Information.
Why Use This Option
Depending on the template that you use, the report contains information about certain types of results from the Results List pane. The template also determines what information is presented in the report and how the information is organized. See the template descriptions below.
Settings – Bug Finder
Default: BugFinderSummary
BugFinder
The report lists:
Polyspace Bug Finder Summary: Number of results in the project. The results are summarized by file. The files that are partially analyzed because of compilation errors are listed in a separate table.
Code Metrics: Summary of the various code complexity metrics. For more information, see Code Metrics.
Coding Rules: Coding rule violations in the source code. For each rule violation, the report lists the:
Rule number and description.
Function containing the rule violation.
Review information, such as Severity, Status and comments.
Defects: Defects found in the source code. For each defect, the report lists the:
Function containing the defect.
Defect information on the Result Details pane.
Review information, such as Severity, Status and comments.
Configuration Settings: List of analysis options that Polyspace uses for analysis. If you configured your project for multitasking, this section also lists the Concurrency Modeling Summary. If your project has source files with compilation errors, these files are also listed.
If you check for coding rules, an additional Coding Rules Configuration section states the rules along with the information whether they were enabled or disabled.
BugFinderSummary
The report lists:
Polyspace Bug Finder Summary: Number of results in the project. The results are summarized by file. The files that are partially analyzed because of compilation errors are listed in a separate table.
Code Metrics: Summary of the various code complexity metrics. For more information, see Code Metrics.
Coding Rules Summary: Coding rules along with number of violations.
Defect Summary: Defects that Polyspace Bug Finder™ looks for. For each defect, the report lists the:
Defect group.
Defect name.
Number of instances of the defect found in the source code.
Configuration Settings: List of analysis options that Polyspace uses for analysis. If you configured your project for multitasking, this section also lists the Concurrency Modeling Summary. For more information, see Complete List of Polyspace Bug Finder Analysis Engine Options. If your project has source files with compilation errors, these files are also listed.
If you check for coding rules, an additional Coding Rules Configuration section states the rules along with the information whether they were enabled or disabled.
CodeMetrics
The report lists the following:
Code Metrics Summary: Various quantities related to the source code. For more information, see Code Metrics.
Code Metrics Details: Various quantities related to the source code with the information broken down by file and function.
Configuration Settings: List of analysis options that Polyspace uses for analysis. If you configured your project for multitasking, this section also lists the Concurrency Modeling Summary. If your project has source files with compilation errors, these files are also listed.
If you check for coding rules, an additional Coding Rules Configuration section states the rules along with the information whether they were enabled or disabled.
CodingStandards
The report contains separate chapters for each coding standard enabled in the analysis (for instance, MISRA C™: 2012, CERT® C, custom rules, and so on). Each chapter contains the following information:
Summary - Violations by File: Graph showing each file with number of rule violations.
Summary - Violations by Rule: Graph showing each rule with number of violations. If a rule is not enabled or not violated, it does not appear in the graph.
Summary for all Files: Table showing each file with number of rule violations.
Summary for Enabled Guidelines or Summary for Enabled Rules: Table showing each guideline or rule with number of violations.
Violations: Tables listing each rule violation, along with information such as ID, function name, severity, status, and so on. One table is created per file.
An appendix lists the options used in the Polyspace analysis.
SoftwareQualityObjectives
The report lists information useful to quality engineers and available on the Polyspace Access™ interface, including:
Information about whether the project satisfies quality objectives
Metrics for the whole project. For each metric, the report also lists the quality threshold and whether the metric satisfies this threshold.
Coding standard violations in the project. For each rule, the report lists the number of justified violations and whether the justifications satisfy Software Quality Objectives.
The appendixes contain further details of Polyspace configuration settings, code metrics, and coding rule violations.
This template is available only if you generate a report from results uploaded to the Polyspace Access web interface. See Upload Results to Polyspace Access. In each case, you have to set the objectives explicitly in the web interface and then generate the reports.
For more information on the predefined Software Quality Objectives, see Evaluate Polyspace Bug Finder Results Against Bug Finder Quality Objectives.
Settings – Code Prover
Default: Developer
CodeMetrics
The report contains a summary of code metrics, followed by the complete metrics for an application.
CodingStandards
The report contains separate chapters for each coding standard enabled in the analysis (for instance, MISRA C: 2012, custom rules, and so on). Each chapter contains the following information:
Summary - Violations by File: Graph showing each file with number of rule violations.
Summary - Violations by Rule: Graph showing each rule with number of violations. If a rule is not enabled or not violated, it does not appear in the graph.
Summary for all Files: Table showing each file with number of rule violations.
Summary for Enabled Guidelines or Summary for Enabled Rules: Table showing each guideline or rule with number of violations.
Violations: Tables listing each rule violation, along with information such as ID, function name, severity, status, and so on. One table is created per file.
An appendix lists the options used in the Polyspace analysis.
Developer
The report lists information useful to developers, including:
Summary of verification results
Code metrics summary
Coding rules:
Summary of violations by file
List of violations
Run-time errors:
List of proven run-time errors or red checks
List of unproven run-time errors or orange checks
List of unreachable procedures or gray checks
Global variable usage in code. See Global Variables (Polyspace Code Prover).
The report also contains the Polyspace configuration settings and modifiable assumptions used in the analysis. If your project has source files with compilation errors, these files are also listed.
DeveloperReview
The report lists the same information as the
Developer
report. However, the reviewed results are sorted by severity and status, and unreviewed results are sorted by file location.Developer_withGreenChecks
The report lists the same information as the
Developer
report. In addition, the report lists code proven to be error-free or green checks.Quality
The report lists information useful to quality engineers, including:
Summary of results
Statistics about the code
Graphs showing distributions of checks per file
The report also contains the Polyspace configuration settings and modifiable assumptions used in the analysis. If your project has source files with compilation errors, these files are also listed.
VariableAccess
The report displays the global variable access in your source code. The report first displays the number of global variables of each type. For information on the types, see Global Variables (Polyspace Code Prover). For each global variable, the report displays the following information:
Variable name.
The entry for each variable is denoted by |.
Type of the variable.
Number of read and write operations on the variable.
Details of read and write operations. For each read or write operation, the table displays the following information:
File and function containing the operation in the form
.file_name
.function_name
The entry for each read or write operation is denoted by
||
. Write operations are denoted by<
and read operations by>
.Line and column number of the operation.
This report captures the information available on the Variable Access pane in the Polyspace user interface.
CallHierarchy
The report displays the call hierarchy in your source code. For each function call in your source code, the report displays the following information:
Level of call hierarchy, where the function is called.
Each level is denoted by |. If a function call appears in the table as
|||->
, the function call occurs at the third level of the hierarchy. Beginning fromfile_name
.function_name
main
or an entry point, there are three function calls leading to the current call.File containing the function call.
In addition, the line and column is also displayed.
File containing the function definition.
In addition, the line and column where the function definition begins is also displayed.
In addition, the report also displays uncalled functions.
This report captures the information available on the Call Hierarchy pane in the Polyspace user interface.
SoftwareQualityObjectives
The report lists information useful to quality engineers and available on the Polyspace Access interface, including:
Information about whether the project satisfies quality objectives
Definite as well as possible run-time errors in the project. For each type of run-time error, the report lists the number of errors justified and whether the justifications satisfy quality objectives.
The appendixes contain further details of Polyspace configuration settings, code metrics, coding rule violations, and run-time errors.
This template is available only if you generate a report from results uploaded to the Polyspace Access web interface. See Upload Results to Polyspace Access. In each case, you have to set the objectives explicitly in the web interface and then generate the reports.
For more information on the predefined Software Quality Objectives, see Evaluate Polyspace Code Prover Results Against Software Quality Objectives (Polyspace Code Prover).
SoftwareQualityObjectives_Summary
The report contains the same information as the
SoftwareQualityObjectives
report. However, it does not have the supporting appendixes with details of code metrics, coding rule violations and run-time errors.This template is available only if you generate a report from results uploaded to the Polyspace Access web interface. See Upload Results to Polyspace Access. In each case, you have to set a quality objective level explicitly in the web interface and then generate the reports.
For more information on the predefined Software Quality Objectives, see Evaluate Polyspace Code Prover Results Against Software Quality Objectives (Polyspace Code Prover).
Dependencies
In the user interface of the Polyspace desktop products, this option is enabled only if you select the
Generate report
option.
Tips
This option allows you to specify report generation before starting an analysis.
To generate a report after an analysis is complete, in the user interface of the Polyspace desktop products, select Reporting > Run Report. Alternatively, at the command line, use the
polyspace-report-generator
command.After analysis, you can also export the result as a text file for further customization. Use the option
-generate-results-list-file
with thepolyspace-report-generator
command.If you use the
SoftwareQualityObjectives_Summary
andSoftwareQualityObjectives
templates to generate reports, the pass/fail status is determined based on all results. For instance, if you use the level SQO-4 which sets a threshold of 60% on orange overflow checks, your project has a FAIL status if the percentage of green and justified orange overflow checks is less than 60% of all green and orange overflow checks.The first chapter of the reports contain a summary of the relevant results. You can enter a Pass/Fail status in that chapter for your project based on the summary. If you use the template
SoftwareQualityObjectives
orSoftwareQualityObjectives_Summary
, the status is automatically assigned based on your objectives and the verification results. For more information on enforcing objectives using Polyspace Access, see Monitor Code Quality Using Quality Objectives Dashboard in Polyspace Access (Polyspace Access).
Command-Line Information
Parameter: -report-template |
Value: Full path to
|
Example (Bug Finder):
polyspace-bug-finder -sources |
Example (Code Prover):
polyspace-code-prover -sources |
Example (Bug Finder
Server):
polyspace-bug-finder-server -sources
|
Example (Code Prover
Server):
polyspace-code-prover-server -sources
|