G-4260
🆓Warning
Avoid inverting boolean conditions with NOT.
Reason
It is more readable to use the opposite comparison operator instead of inverting the comparison with not
.
Example
Non-Compliant Example
declare l_color types_up.color_code_type; begin if not l_color != constants_up.co_red then my_package.do_red(); end if; end; /
Issues
Line | Column | Message |
---|---|---|
4 | 7 |
★★★★★
Compliant Solution -
declare l_color types_up.color_code_type; begin if l_color = constants_up.co_red then my_package.do_red(); end if; end; /
Parameters
Use parameters to customize the rule to your needs.
Parameter | Description | Default Value |
---|---|---|
DisableAllQuickFix | Comma-separated ist of rules for which a quick fix should not be applied to all the problems in a file. | Core G-3130 |
References
- same as plsql:S1940
- same as Trivadis G-4260