In this recipe, we will see how we can suppress messages (generated from checks) of a particular category so that they do not appear in the results tree. It is not possible to hide all messages. However, there are some that may be hidden. These are known as exception.
In this recipe, we will see the different ways of finding out whether a particular message may be hidden and the code for hiding such messages using pseudo-comments.
Carry out these steps:
SELECT * FROM ZTAB. "EC# CI_NOWHERE
We used the results to find out whether the message may be suppressed or not. The presence o f the icon confirmed the possibility of hiding the NO_WHERE
message. We then wrote the pseudo comment along with the SELECT
statement. When we rerun the inspection, the SELECT
statement with the pseudo comment will not be shown in the messages.
Suppose we need to suppress message for multiple SELECT
statements, we need to write the corresponding pseudo comment correctly with each statement.
We can also find out the pseudo comment of a check ( if applicable) directly from the categories and checks display. For this, expand the relevant category folder in order to display the relevant check. Click the icon next to the check title. This will display the documentation of the check in a separate window. The pseudo comment will then be displayed at the end of the window as shown in the following screenshot:
18.225.57.126