MATLAB: How to generate a Polyspace Bug Finder or Code Prover report which includes SQO thresholds from command line in R2018a

Polyspace Bug FinderPolyspace Bug Finder Server

I have automated the Polyspace verification but now need to set a custom review scope before generating a report.
How can I do that automatically?
What do I have to do, to set another review scope as default, or for the report generation?

Best Answer

You can do this as follows:
set MATLAB=C:\Program Files\MATLAB\R2018a
"%MATLAB%\polyspace\bin\polyspace-results-repository.exe" -download -f -prog Code_Prover_Example -verif-version 1.1 -product "Code Prover" Results_SQO
"%MATLAB%\polyspace\bin\polyspace-report-generator.exe" -results-dir Results_SQO -template "%MATLAB%\toolbox\polyspace\psrptgen\templates\metrics\SoftwareQualityObjectives_Summary.rpt" -format PDF
The first command *polyspace-results-repository *(after the set) is downloading the results 1.1 from the project Code_Prover_Example into the results folder Results_SQO.
The next command polyspace-report-generator is launching the report generation using the template SoftwareQualityObjectives_Summary.rpt _in PDF format for the results in the results folder _Results_SQO.
The SQO level will be the one set in Polyspace Metrics.