...
Right-click on a single finding or a group of selected findings and choose Suppress from the menu.
Enter a reason for suppressing the finding and choose Choose where the suppressions will be stored. You can select one of the following options:
- In source code - The selected finding will be suppressed in code and shared across the team when checked in your source control system.
- Locally in file - The suppression will be stored in a parasoft.suppress file located in the same location as the corresponding source file. See In-file Suppressions for details.
- On DTP- The suppression will be stored on DTP and shared with the team. You can only suppress findings that are already registered on DTP.
Info icon false title Suppressing Findings on DTP The On DTP option is only available for findings that have already been registered on DTP and are suppressed in the subsequent analysis run..
Enter a reason for suppressing the finding.
Click OK to complete the suppressionInfo title Suppressing false positives in MISRA compliance workflows If you implement a workflow for achieving compliance with the MISRA standard, you can exclude false positive violations from MISRA Compliance reports created on DTP. When you suppress a violation and specify a reason for suppression that begins with "false positive", the violation will not be included in MISRA Compliance reports. See the DTP User Guide for details about the Parasoft compliance solution
.
Anchor | ||||
---|---|---|---|---|
|
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:
Code Block | ||
---|---|---|
| ||
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 |
See Defining Suppressions in Suppression Files for details about the suppression format and the complete list of available attributes.
...
- Enable the Show All Files option on the Visual Studio Solution Explorer toolbar or refresh the Solution Explorer if the option is already enabled. This will display files from outside the project, including the Parasoft suppression files.
- Right-click the suppression file(s) you add to your project and choose Include in Project from the menu.
If you use a source control system to track changes in source code, we recommend that you check in parasoft.suppress files to share your suppressions across the team.
Info | ||||||
---|---|---|---|---|---|---|
| ||||||
Suppressions associated with files that are not available the workspace are not converted. The list of unconverted suppressions is printed on the console. If you should want to restore deprecated suppressions from the backup file:
You can re-migrate restored suppressions on next IDE startup. |
Reviewing Suppressions
You can review suppressed findings and unsuppress the findings that have been saved locally on desktop.
...