Main Content

polyspace_report

R2026b

Generate reports from Polyspace analysis results

The following options have been removed and issue an error:

  • -generate-results-list-file

  • -generate-variable-access-file

Use polyspace-results-export instead for exporting results to an external format such as CSV or JSON.

Use the VariableAccess report template for generating a global variables accesses report. See Bug Finder and Code Prover report (-report-template).

Description

polyspace_report('-template', template, '-results-dir', resultsFolder, options) generates a report using a predefined template specified by template. By default, the report is named after the results file in the folder resultsFolder and saved in the Polyspace-Doc subfolder. You can change the default behavior using additional options.

Note

example

Examples

collapse all

Generate a PDF report from sample Polyspace Code Prover™ results.

template = fullfile(polyspaceroot,'toolbox','polyspace','psrptgen','templates',...
    'Developer.rpt');
resPath = fullfile(polyspaceroot,'polyspace','examples','cxx','Code_Prover_Example',...
    'Module_1','CP_Result');
polyspace_report('-template', template, '-results-dir', resPath, '-format', 'PDF');

Input Arguments

collapse all

Path to report template file, specified as a character vector. To generate multiple reports, specify a comma-separated list of report template paths in the character vector (do not put a space after the commas). The templates are available in polyspaceroot\toolbox\polyspace\psrptgen\templates\ as .rpt files. Here, polyspaceroot is the Polyspace installation folder. For more information on the available templates, see Bug Finder and Code Prover report (-report-template).

Example: fullfile(polyspaceroot,'toolbox','polyspace','psrptgen','templates', 'Developer.rpt');

Folder containing analysis results, specified as a character vector. The folder must contain a .psbf file containing Polyspace Bug Finder™ results or a .pscp file containing Polyspace Code Prover results.

To generate reports for multiple analyses, specify a comma-separated list of folder paths (do not put a space after the commas).

Example: 'C:\Polyspace_Workspace\My_project\Module_1\results'

Options to control report generation, for instance, output format and output name.

Specify each option as a character vector, followed by the option value as a separate character vector. For instance, you can specify the PDF format by using the syntax polyspace_report(..., '-format','PDF').

OptionValueDescription
'-format''PDF', 'HTML' or 'WORD'

File format of the report that you generate. By default, the command generates a Word document.

To generate reports in multiple formats, specify a comma-separated list of formats. (Do not put a space after the commas). For instance, polyspace_report(..., '-format', 'PDF,HTML').

'-output-name'

Report name, for instance, PolyspaceReport.

Name of the generated report or folder name if you generate multiple reports.

The full path to the report is created by appending the name to the current working folder. To store the reports on a different path, specify the full path as value for this option.

'-noview' 

Disable the opening of the generated report. Unless you specify this option, the generated report opens in the default application for the report type (for instance, PDF reports in a PDF viewer).

'-set-language-english' 

Generate the report in English. Use this option if your display option is set to another language.

Tips

Report generation can take a long time for result sets containing a very large number of defects or coding rules violations. In some cases, you might run into issues from insufficient memory. If that happens, you can increase the Java® heap size or export your results to a tab-delimited text file. For more information, see Fix Insufficient Memory Errors During Polyspace Report Generation.

Version History

Introduced in R2013b

expand all