Fix catagorization of guideline severties.
Closed this issue · 0 comments
PhilippSalvisberg commented
In the talk Fighting Bad PL/SQL & SQL I categorised the violations of the following guidelines as bugs:
Id | Title | Severity in 4.2 |
---|---|---|
G-1080 | Avoid using the same expression on both sides of a relational comparison operator or a logical operator. | Minor |
G-2150 | Avoid comparisons with NULL value, consider using IS [NOT] NULL. | Blocker |
G-3185 | Never use ROWNUM at the same query level as ORDER BY. | Major |
G-4230 | Always use a COALESCE instead of a NVL command, if parameter 2 of the NVL function is a function call or a SELECT statement. | Critical |
G-4250 | Avoid using identical conditions in different branches of the same IF or CASE statement. | Major |
G-5080 | Always use FORMAT_ERROR_BACKTRACE when using FORMAT_ERROR_STACK or SQLERRM. | Minor |
G-7810 | Never use SQL inside PL/SQL to read sequence numbers (or SYSDATE) | Major |
G-9010 | Always use a format model in string to date/time conversion functions. | Major |
Bugs are a blocker IMO. Hence all these guidelines should be blocker according to Severity of a rule. G-4230 is an exception since the violation does not lead to a wrong result, just to slower execution. Hence "critical" is an acceptable severity in this case. For a similar reason, G-5080, G-7810 should be changed to "critical" and not "blocker".
It's probably a good idea to check the severity of all guidelines and amend them if necessary.