Sometimes Prolint may raise a warning you don't agree with.
For example, rule "noundo" might warn that a specific temp-table is defined without NO-UNDO while you are certain that not using no-undo
is intentional.
In such cases you may want to suppress the Prolint warning.
There are two separate ways to suppress warnings:
Finally, if you really completely disagree with a rule, you can put it in the "skiprules" list. In that case Prolint will pretend the rule does not exist at all. The "skiprules" list is file "prolint/custom/rules/skiprules.lst". Its format is simple: each line contains one rule-id.
Let's begin with an example:
{&_proparse_ prolint-nowarn(noundo)} DEFINE TEMP-TABLE tt_mytable FIELD code AS CHAR FIELD desc AS CHAR INIT "<description>" INDEX idx_code AS PRIMARY UNIQUE code. |
When Prolint executes rule "noundo" it will simply skip the statement, the statement is invisible to the rule.
Prolint will still give a warning for rule "abbrevkwd" because INIT is an abbreviation for INITIAL, and a warning for
rule "strattrib" because "<description>" does not have any string attributes.
If you are sure you want to suppress these warnings too, you can extend the _proparse_ directive to:
{&_proparse_ prolint-nowarn(noundo,abbrevkwd,strattrib)} DEFINE TEMP-TABLE tt_mytable FIELD code AS CHAR FIELD desc AS CHAR INIT "<description>" INDEX idx_code AS PRIMARY UNIQUE code. |
Note:
There is no way to suppress all warnings.
There is also no way to suppress warnings for a larger scope than just one single statement.
This is intentional: adding _proparse_ directives is meant to be more work than fixing the cause of the warning.
Another note:
Please don't use the _proparse_ directive immediately after the ELSE keyword.
/* this does not work and confuses the parser: */ IF False THEN RUN first.p. ELSE {&_proparse_ prolint-nowarn(runname)} RUN Second.p. /* this is better: */ IF False THEN RUN first.p. ELSE DO: {&_proparse_ prolint-nowarn(runname)} RUN Second.p. END. /* or this is also fine: */ {&_proparse_ prolint-nowarn(runname)} IF False THEN RUN first.p. ELSE RUN Second.p. |
Filters intercept warnings after they are created by a rule, but before they are published to outputhandlers. Filters can modify or hide warnings.
You can create new filters, or configure existing filters. See topic "filter plug-ins" for more information.