Main Content

polyspace_report

Generate reports from Polyspace analysis results

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.

example

polyspace_report('-generate-results-list-file', '-results-dir', resultsFolder, options) exports the list of Polyspace® results to a tab-delimited text file.

polyspace_report('-generate-variable-access-file', '-results-dir', resultsFolder, options) exports the list of global variables to a tab-delimited text file.

Note

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').

This option is not compatible with -generate-variable-access-file and -generate-results-list-file.

'-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 either increase the Java® heap size or use the option-value pair '-wysiwyg', 'scopeName' to generate multiple filtered reports instead of a single report containing all results. Here, scopeName is the name of a review scope that narrows down the list of results to be reported. For more information on how to create such review scopes, see Fix Insufficient Memory Errors During Polyspace Report Generation.

Version History

Introduced in R2013b