This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Address Polyspace Results Through Bug Fixes or Comments

Once you understand the root cause of a Polyspace® finding, you can fix your code. Otherwise, add comments to your Polyspace results to fix the code later or to justify the result. You can use the comments to keep track of your review progress.

If you add comments to your results file, they carry over to the next analysis on the same project. If you add comments to your code (annotate), they carry over to any subsequent analysis of the code, whether in the same project or not.

Comment in Result Details pane

Set the Status, Severity, and comment fields in the Result Details pane. The status indicates your response to the Polyspace result. If you do not plan to fix your code in response to a result, assign one of the following statuses:

  • Justified

  • No Action Planned

  • Not a Defect

Based on the status, Polyspace considers that you have given due consideration and justified that result (retained the code despite the result).

Comment or Annotate in Code

If you enter code comments or annotations in a specific syntax, the software can read them and populate the Severity, Status, and comment fields in the next analysis of the code. Open your source code in an editor and enter the annotation on the same line as the result.

For the annotation syntax, see Annotate Code and Hide Known or Acceptable Results.

If you do not specify a status in your annotation, Polyspace assumes that you have set a status of No Action Planned.

Related Topics