This topic explains how to prevent SOAtest from reporting specific static analysis violations (e.g., when you generally follow a rule, but decide to ignore that rule in an isolated number of exceptional situations). Suppression schemes can be entered in the GUI or defined directly in the source code.
Sections include:
Suppressions are used to prevent SOAtest from reporting additional occurrences of a specific static analysis task (multiple tasks might be reported for a single rule). Suppressed messages will be sent to a special Suppressions view instead of the Quality Tasks view; this allows you to monitor those violations as needed while keeping your main results areas focused on the other errors.
You use suppressions for situations when you generally want to follow a rule, but decide to ignore that rule in an isolated number of exceptional situations. With suppressions, you can continue checking whether your code follows that rule without receiving repeated messages about your intentional rule violations. If you do not want to receive error messages for any violations of a specific rule, we recommend that you modify your Test Configurations so that they no longer check that rule.
Note that suppression settings are independent of Test Configurations. To avoid confusion, keep in mind that:
This means that rules selected in the Test Configuration will be checked during analysis, but results that match the suppression criteria will not be displayed.
Suppressions prevent the reporting of a specific static analysis task (e.g., fix the violation of rule X that occurs in line Y); they do not prevent the reporting of all violations of a rule. |
To suppress a static analysis task that is shown in the Quality Tasks view:
The task will then be "suppressed" and removed from the Quality Tasks view. A suppression entry will be added to the Suppressions view. If the same static analysis violation is found in subsequent tests of this project, it will be reported in the Suppressions view, but not in the Quality Tasks view.
To view the suppressed messages that were reported in a subsequent test run:
The Suppression Messages view will display the following information:
To sort the Suppressions view contents by one of the column headings, click that column heading.
Right-click the suppression in the Suppressions view, choose Edit Message or Edit Reason from the shortcut menu that opens, and modify the message or reason in the dialog that opens. |
You can restrict which suppressions are shown in the Suppressions view by using the available suppressions filter.
To filter the suppressions shown in the Suppressions view:
Select the suppression you want to remove and click the Red X Remove Suppression icon in the top right of the view.
If this same static analysis violation is found in subsequent tests of this project, the task will be reported in the Quality Tasks view.