Add MISRA and error comment

조회 수: 6 (최근 30일)
Salvatore Nappi
Salvatore Nappi 2018년 7월 23일
답변: Salvatore Nappi 2018년 10월 3일
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
Alexandre De Barros 2018년 7월 25일
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
Alexandre De Barros 2018년 7월 27일
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
Alexandre De Barros 2018년 8월 22일
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