Polyspace 2017b Not Populating from Code comments
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
It appears that Polyspace 2017b is not reading its own pre-jusifications from the code files. When I copy a justification from the tool to the code, and rerun the analysis, I do not see the comment prefill the columns. The comment does appear in the "Source" window, so the comment is in the correct file.
If I use the previous justification style, I see the columns get prefilled.
In 2017b, the pre-justification looks like:
/* polyspace MISRA-C3:7.1 [[Justified] [Not a Defect]:Low] "Explanation" */
Previous (2016b?) it looks like:
/* polyspace<MISRA-C3:7.1:Not a Defect:Justified> Explanation */
Why does 2017b not properly read the comment copied directly from Polyspace itself?
0 comentarios
Respuestas (2)
Alexandre De Barros
el 7 de Nov. de 2017
Editada: Alexandre De Barros
el 7 de Nov. de 2017
Hello,
I cannot reproduce this prejustified comment. What Status and Severity have you set for the violation?
Here is an example of justification with R2017b:
/* polyspace MISRA-C3:5.3 [To fix:High] "some comment" */
Indeed, the format of code annotations has changed in this version, and is more flexible. For example, the status, severity and comments are now optional. And to specify the status and the severity, the format is:
[Status:Severity]
In your case, it's like you have two statuses.
The syntax to use is then:
/* polyspace MISRA-C3:7.1 [Not a Defect:Low] "Explanation" */
,if the status should be set to "Not a Defect".
More information on the new format here: https://www.mathworks.com/help/bugfinder/ug/annotate-and-hide-known-or-acceptable-results.html
Alex
4 comentarios
Alexandre De Barros
el 8 de Nov. de 2017
Hi Trenton,
The new code annotations should be placed on the line where the violation/check/defect is.
Could you try with this new version:
if (Lbl == 0130) // octal label 130 // polyspace MISRA-C3:7.1 [Justified:Low] "Preferred for ease"
The I/O internal error is very suspicious. I suggest you to contact the support, and send the verification log file.
Best regards,
Alexandre
Oliver Mueller
el 28 de Oct. de 2019
Looks like this was found to be a bug in Polyspace: https://www.mathworks.com/support/bugreports/details/1799794
Kier
el 15 de Mayo de 2018
I have this problem too. The text generated by "Add Pre-Justification To Clipboard" is not an acceptable syntax for Polyspace to recognise.
Here's the clipboard text that doesn't work:
/* polyspace MISRA-C3:2.5 [Justified:Low] "For future debug use." */
...and here's the manually modified syntax that does work:
/* polyspace<MISRA-C3:2.5 : Low : Justified> For future debug use. */
This syntax matches the documentation so the question is really: Why Doesn't the Add Pre-Justification To Clipboard generate the correct syntax?
2 comentarios
Alexandre De Barros
el 15 de Mayo de 2018
Hi!
Are you placing the code annotation on the line where the violation is? That's where the code annotation should be placed with the new format.
Best regards,
Alexandre
Kier
el 16 de Mayo de 2018
Thanks for information. So to summarise:
- There is a new format which is generated by "Add Pre-Justification" and this must go on the same line as the violation.
- The old format which was applied to the succeeding line is still recognised by 2017b.
Is my understanding correct?
Thanks.
Kier.
Ver también
Categorías
Más información sobre Bug Finder Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!