Add MISRA and error comment

3 次查看(过去 30 天)
Salvatore Nappi
Salvatore Nappi 2018-7-23
Hi,
is there a quickly procedure (without using GUI) to insert MISRA and error comment in the source code?
Could you give me any support, please?
Thanks in advance

回答(4 个)

Alexandre De Barros
Hello,
No, there is no way to quickly annotate the code itself. What is the need here, and how would you choose the violations and errors to annotate?
Best regards,
Alexandre

Salvatore Nappi
Salvatore Nappi 2018-7-26
Hello Alexandre, I need to insert MISRA C2012 justification in the source code. The procedure should be the following by using ps_results.psbf file and Polyspace: 1) for each MISRA violation identify the line source code where violation is present 2) Select the violation in the Polyspase GUI (on the left interface) and chose the correct values for Status and Severity. After selecting the violation, select "Add pre-justification to clipboard" in the menu (with right button) and paste the comment in the source code, the same with Defect. The ps_results.psbf is generated by using the bug finder command polyspace\\bin\\polyspace-bug-finder-nodesktop.exe" -lang C -options-file Could you tell me if my procedure is correct and if exist a faster alternative procedure
Best Regards
  1 个评论
Alexandre De Barros
Hello Salvatore,
In other words, you would like to have, from a commented violation or defect in the Results List, a new command in the contextual menu to automatically add the annotation in the code, instead of selecting "Add pre-justification to clipboard", edit the file at the right line and paste the annotation (something you can already do today).
As explained earlier, this is not possible for the moment, but I can make this suggestion to the R&D team.
Best regards,
Alexandre

请先登录,再进行评论。


Salvatore Nappi
Salvatore Nappi 2018-8-21
Hello Alexander, is possible to get a report that contains information about the lines where are present the MISRA 2012 violations in the source code? In this way should be more quickly to insert the MISRA comment directly in the source code without using the GUI. Best regards
Salvatore
  1 个评论
Alexandre De Barros
Hello Salvatore !
The line numbers for the coding rule violations are available in reports generated from Code Prover only.
Alex

请先登录,再进行评论。


Salvatore Nappi
Salvatore Nappi 2018-10-3
Hello Alexander, I have a question regarding MISRA rule 11.4. I executed the MISRA verification by using Polyspace 2017 e 2018 on the same source code and I faced that the MISRA rule 11.4 was indicated in the report with Polyspace 2017 but not for 2018 and the source code was the same. Could you give me any details about this behavior, please?
Thanks in advance

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by