Import comments to Polyspace Code Prover
26 views (last 30 days)
Show older comments
Hi guys, i have a question, please help me.
Does any way to import comment of analyzed warnings from Csv file or Excel file to Polyspace comments database ?
And how to read file ps_comments.db or how to find the decryption key for this file ?
Thanks for your help.
0 Comments
Accepted Answer
Anirban
on 10 Mar 2020
Edited: Anirban
on 10 Mar 2020
Hi Hong,
I would like to know the full workflow to understand why you cannot assign the comments in the Polyspace user interface itself. It sounds like you are exporting the results to an Excel file, then adding comments and then re-importing the comments back to the results (or perhaps to some other results).
If you want to transfer comments from one Polyspace result set to another, see here: https://www.mathworks.com/help/bugfinder/ug/import-comments-from-previous-polyspace-analysis.html
2 Comments
Anirban
on 16 Mar 2020
Edited: Anirban
on 16 Mar 2020
Hi Hong,
We do not offer a way to access ps_comments.db directly. This is intentional, because we want the user to at least look at a result before justifying it through comments.
However, in the Polyspace UI, you can mass-select many results and add the same comment to them.
But I want to understand your workflow better. You want to write a script that adds comments to a bunch of results. In that script, how will you decide what type of results? Is it always specific types of results that you want to comment on? Maybe you do not want to review those results at all? In the UI, you can create a review scope so that specific types of results are never shown. See here: https://www.mathworks.com/help/bugfinder/ug/filter-results.html
If your intention is to comment on results so that you see only new results in the next run (the ones that are uncommented), there are easier ways to do this. Actually, there is no work required on your part. Just use the 'New' filter in the UI (details here: https://www.mathworks.com/help/bugfinder/ug/filter-results.html). If you really want a command-line workflow, there are ways to do that too:
- You can export the results to a text file (using the polyspace-report-generator command with the -generate-results-list-file option). The text file has a column ‘New’ that states what is new compared to the previous result. See more here: https://www.mathworks.com/help/bugfinder/ug/export-results-to-text-file.html
- You can use the MATLAB API to export the results to a MATLAB table. This table also has a column 'New'. If you have the pre-19a Polyspace, MATLAB comes with your installation and you can use the API. See more here: https://www.mathworks.com/help/bugfinder/ug/visualize-bug-finder-analysis-results-in-matlab.html
In either case, the end-product is something that you do not open in the Polyspace UI (a CSV file or a MATLAB table). Nothing is written back to the Polyspace results. The only way we support writing back to the Polyspace results is through the UI.
But the bottomline is: if you just want to see new results compared to a previous analysis, the product gives you this info. You do not need to add comments and then display uncommented results later to see what’s new.
If you want to see only unreviewed results (results that might have been in the previous analysis but never got reviewed), that is the only case where you need the comments workflow you are suggesting. Here, you would comment a result to indicate that someone has looked at it. For this workflow, it is preferable that you open the results in the UI and add your comments the first time (by mass-selecting results or whatever). Then you can keep importing those comments to the next analysis (both from the UI and command line). So, for each result, it is a one-time effort. For details, see here: https://www.mathworks.com/help/bugfinder/ug/import-comments-from-previous-polyspace-analysis.html
You can also contact MathWorks Technical Support: https://www.mathworks.com/support/contact_us.html. I am only giving generic information about workflows. Technical Support can try to understand your intentions better and support you with the features that are already present in your version of the product.
More Answers (0)
See Also
Categories
Find more on Generate Report in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!