This topic explains how to suppress Parasoft findings using in an IDE. See Suppressing the Reporting of Findings for information about manually suppressing findings in source code or a suppression file.
In this section:
You can suppress individual instances of findings, all instances of a finding type in a file, or all findings in the file from the Findings view.
Right-click on a single finding or a group of selected findings and choose Suppress from the menu.
Choose where the suppressions will be stored. You can select one of the following options:
The 'On DTP' option is only available for findings that have been imported from DTP (see Importing Findings). The selected findings will be instantly removed from the Findings view and suppressed after the subsequent analysis run. |
Enter a reason for suppressing the finding.
If you are using the MISRA Compliance Pack for DTP, see the DTP User Guide to learn more about how suppressions are handled by MISRA compliance reporting on DTP.
If you choose to store a suppression in a file, it will be stored in a parasoft.suppress file created in the same location as the source file that contains the finding. When you add a suppression, the file automatically opens in the IDE editor. The contents of the file may resemble the following:
suppression-begin file: Simple.cpp rule-id: SECURITY-22 message: Do not use mbstowcs() function reason: verified author: annstu suppression-end suppression-begin file: Account.cpp rule-id: JSF-043 message: Tabs should be avoided reason: verified author: annstu suppression-end |
If you are using an Eclipse IDE, newly created suppression files are automatically added to your project and displayed in the file tree with other project files. In Visual Studio, you need to manually add individual suppression files to your project:
You can review findings that have been suppressed.
Click Parasoft in the menu bar, choose Options (Visual Studio) or Preferences (Eclipse),select Import Findings and Coverage and enable the Suppressed findings option (see Customizing Import Options for details).
Open the Findings view, choose Configure Contents from the menu and enable the Suppressed findings option (see Customizing the Findings View for details).
Run analysis or import findings (see Importing Findings). The suppressed findings will be displayed in the Findings view.
You can remove suppression of a previously suppressed finding.