Main Content

Generate Reports from Polyspace Results

This topic shows how to generate reports from results generated with a Polyspace® desktop product. To generate reports from results uploaded to the Polyspace Access™ web server, see polyspace-report-generator.

To generate reports from Polyspace results, you can do one of the following:

  • Run a Polyspace analysis and create a report from the analysis results. See the workflow described here.

  • Specify that a report will be automatically generated after analysis. For more information on the options, see Reporting. Report generation immediately after analysis is supported for both desktop and server products.

  • Export your results to a text file and generate graphs and statistics. See Export Polyspace Analysis Results.

Depending on the template you use, the report contains information about certain types of results from the Results List pane. You can see the following information about a result:

  • ID: Unique number for a result for the current analysis

    To identify the result in your source code, you can use the ID in the Results List pane of the Polyspace user interface or in your IDE if you are using a Polyspace plugin.

  • Check: Defect names, MISRA C™:2012 coding rule number, and so on.

  • File and function

  • Status, Severity, Comment: Information that you enter about a result.1

Use the report for archiving, gathering statistics and checking whether results have been reviewed and addressed (for certification purposes or otherwise). To review a result in your source code, use the Polyspace user interface or your IDE if you are using a Polyspace plugin.

Generate Reports from User Interface

You can generate a report from your analysis results. Using a customizable template, the report presents your results in a concise manner for managerial review or other purposes.

  1. Open your results file.

  2. Select Reporting > Run Report.

    The Run Report dialog box opens.

    Run Report dialog box

  3. Select the following options:

    • In the Select Reports section, select the types of reports that you want to generate. Press the Ctrl key to select multiple types. For example, you can select BugFinder and CodeMetrics.

    • Select the Output folder in which to save the report.

    • Select an Output format for the report.

    • If the display language (Windows®) or locale (Linux® and macOS) of your operating system is set to another language that Polyspace supports (Japanese or Chinese), you see an option to generate English reports. Select this option to generate the report in English instead of in the other language.

      If the display language or locale is not supported by Polyspace, the report is generated in English even if you do not select the option.

    • If you want to filter results from your report, use filters on the Results List pane to display only the results that you want to report. Then, when generating reports, select Only include currently displayed results. You cannot display filtered reports for results downloaded from Polyspace Metrics.

      For more information on filtering, see Filter and Group Results in Polyspace Desktop User Interface.

  4. Click Run Report.

    The software creates the specified report and opens it.

Generate Reports from Command Line

You can script the generation of reports using the polyspace-report-generator command.

To generate BugFinder and CodeMetrics HTMLreports for results in C:\Users\johndoe\Documents\Polyspace\Examples\Bug_Finder_Example\Module_1\BF_Result, use the following options with the command:

SET template_path=^
"C:\Program Files\MATLAB\R2018a\toolbox\polyspace\psrptgen\templates\bug_finder"
SET bf_templates=^
%template_path%\BugFinder.rpt,%template_path%\CodingMetrics.rpt
SET results_dir=^
"C:\Users\johndoe\Documents\Polyspace\Examples\Bug_Finder_Example\Module_1\BF_Result"

polyspace-report-generator ^
-results-dir %results_dir% ^
-template %bf_templates% ^
-format html

See Also

| |

Related Topics


1 Reports generated from Polyspace results are typically meant for archiving and certification. Therefore, the reports contain all Polyspace results, justified or otherwise. Justified results show the justification status, for instance, No Action Planned, along with comments supporting the justification. These reports allow standards committees such as certification authorities to verify if a Polyspace result was justified for approved reasons.