Suppressing Findings in the IDE
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 a violation or multiple selected violations and choose Suppress from the menu.
Enter a reason for suppressing the violation and choose a suppression type when prompted.
- Click OK to complete the suppression.
Suppressing Findings in Source Code
To define dotTEST suppressions directly in the C# and VB.NET source code:
- Determine the rule ID of the rule that you want to suppress. Rule IDs are listed in the Test Configurations.
- Open the source code in an editor.
- Enter a comment (in the following format) at the line of code where you want to start the suppressing the violation:
// parasoft-begin-suppress <RULE_ID>
To suppress all violations in a category, list only the category part of the Rule ID. For example, use the following comment to suppress all rules in the COM (COM Guidelines) category:
// parasoft-suppress COM
To suppress violations of two or more rules, list both Rule IDs, separated by one or more space characters. For example. use the following comment to suppress the rules COM.SCVA and COM.SRTMR:
// parasoft-suppress COM.SCVA COM.SRTMR
- Enter the following comment at the line of code where you want to stop suppressing the violation:
Save the modified code.
The line "Move(+1)" will be ignored by CS.PUO.