Azzera filtri
Azzera filtri

Polyspace 2017b Not Populating from Code comments

6 visualizzazioni (ultimi 30 giorni)
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?

Risposte (2)

Alexandre De Barros
Alexandre De Barros il 7 Nov 2017
Modificato: Alexandre De Barros il 7 Nov 2017
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:
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".
  4 Commenti
Alexandre De Barros
Alexandre De Barros il 8 Nov 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,
Oliver Mueller
Oliver Mueller il 28 Ott 2019
Looks like this was found to be a bug in Polyspace:

Accedi per commentare.

Kier il 15 Mag 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 Commenti
Alexandre De Barros
Alexandre De Barros il 15 Mag 2018
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,
Kier il 16 Mag 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?

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by