From fe43b6674dcc1a9d7bf27b3d11b6733d95041ff7 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 16:55:04 +0200 Subject: [PATCH 01/59] extend severity descriptions to make distinction clearer --- docs/1-introduction/introduction.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/1-introduction/introduction.md b/docs/1-introduction/introduction.md index 5d8b45e3..684ade6a 100644 --- a/docs/1-introduction/introduction.md +++ b/docs/1-introduction/introduction.md @@ -26,19 +26,19 @@ Testability | The capability of the software product to enable modified software ### Severity of the rule !!! bug "Blocker" - Will or may result in a bug. + Will or may result in a bug; for example, an incorrect result or a runtime exception. !!! danger "Critical" - Will have a high/direct impact on the maintenance cost. + Will have a high/direct impact on the maintenance cost. May have an impact on runtime behavior; for example, incomplete audit data or slower runtime performance. !!! warning "Major" - Will have a medium/potential impact on the maintenance cost. + Will have a medium/potential impact on the maintenance cost. May have an impact on runtime behavior; for example, higher memory consumption. !!! tip "Minor" - Will have a low impact on the maintenance cost. + Will have a low impact on the maintenance cost. No impact on the runtime behavior. !!! info "Info" - Very low impact; it is just a remediation cost report. + Very low impact; it is just a remediation cost report. No impact on runtime behavior. For example, a NOSONAR marker comment. ### Keywords used From ae9375f53a2d43297f082c67c0a96f09e3abd251 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 16:56:31 +0200 Subject: [PATCH 02/59] change severity from "Minor" to "Major" for G-1030 --- docs/4-language-usage/1-general/g-1030.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/1-general/g-1030.md b/docs/4-language-usage/1-general/g-1030.md index 2f2cc956..8bba6a17 100644 --- a/docs/4-language-usage/1-general/g-1030.md +++ b/docs/4-language-usage/1-general/g-1030.md @@ -1,6 +1,6 @@ # G-1030: Avoid defining variables that are not used. -!!! tip "Minor" +!!! warning "Major" Efficiency, Maintainability ## Reason From 3477a227c9f290e5417c552838bd27f8135a7d61 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 16:56:50 +0200 Subject: [PATCH 03/59] change severity from "Minor" to "Major" for G-1040 --- docs/4-language-usage/1-general/g-1040.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/1-general/g-1040.md b/docs/4-language-usage/1-general/g-1040.md index bca2fbe4..1843a868 100644 --- a/docs/4-language-usage/1-general/g-1040.md +++ b/docs/4-language-usage/1-general/g-1040.md @@ -1,6 +1,6 @@ # G-1040: Avoid dead code. -!!! tip "Minor" +!!! warning "Major" Maintainability ## Reason From 0e4bb2d41349e72f2f248ece49797d1966ef0e1d Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 16:58:44 +0200 Subject: [PATCH 04/59] change severity from "Major" to "Critical" for G-1060 --- docs/4-language-usage/1-general/g-1060.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/1-general/g-1060.md b/docs/4-language-usage/1-general/g-1060.md index 9e827fe4..34a8990e 100644 --- a/docs/4-language-usage/1-general/g-1060.md +++ b/docs/4-language-usage/1-general/g-1060.md @@ -1,6 +1,6 @@ # G-1060: Avoid storing ROWIDs or UROWIDs in database tables. -!!! warning "Major" +!!! danger "Critical" Reliability ## Reason From dc6199adf61d5c2cbbf80db2e9aac95656f16aff Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:00:21 +0200 Subject: [PATCH 05/59] change severity from "Minor" to "Blocker" for G-1080 reason: this is most probably a bug and if not this should be fixed to make it clear. --- docs/4-language-usage/1-general/g-1080.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/1-general/g-1080.md b/docs/4-language-usage/1-general/g-1080.md index 3013c9b0..ed223b32 100644 --- a/docs/4-language-usage/1-general/g-1080.md +++ b/docs/4-language-usage/1-general/g-1080.md @@ -1,6 +1,6 @@ # G-1080: Avoid using the same expression on both sides of a relational comparison operator or a logical operator. -!!! tip "Minor" +!!! bug "Blocker" Maintainability, Efficiency, Testability ## Reason From e8a61d270580c62d89ae8520db66f691085d043f Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:00:49 +0200 Subject: [PATCH 06/59] change severity from "Minor" to "Blocker" for G-21445 --- docs/4-language-usage/2-variables-and-types/1-general/g-2145.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/2-variables-and-types/1-general/g-2145.md b/docs/4-language-usage/2-variables-and-types/1-general/g-2145.md index 5dca2b3e..f290e183 100644 --- a/docs/4-language-usage/2-variables-and-types/1-general/g-2145.md +++ b/docs/4-language-usage/2-variables-and-types/1-general/g-2145.md @@ -1,6 +1,6 @@ # G-2145: Never self-assign a variable. -!!! tip "Minor" +!!! bug "Blocker" Maintainability ## Reason From 36148248bde52bdf2f5e1da091272723871a9164 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:01:19 +0200 Subject: [PATCH 07/59] change severity from "Minor" to "Major" for G-2185 --- docs/4-language-usage/2-variables-and-types/1-general/g-2185.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/2-variables-and-types/1-general/g-2185.md b/docs/4-language-usage/2-variables-and-types/1-general/g-2185.md index 7bb3dca2..2db3217d 100644 --- a/docs/4-language-usage/2-variables-and-types/1-general/g-2185.md +++ b/docs/4-language-usage/2-variables-and-types/1-general/g-2185.md @@ -1,6 +1,6 @@ # G-2185: Avoid using overly short names for explicitly or implicitly declared identifiers. -!!! tip "Minor" +!!! warning "Major" Maintainability ## Reason From 930b7bc8b188df088fb7b91074c45346bff888cb Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:01:44 +0200 Subject: [PATCH 08/59] change severity from "Major" to "Blocker" for G-2190 --- docs/4-language-usage/2-variables-and-types/1-general/g-2190.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/2-variables-and-types/1-general/g-2190.md b/docs/4-language-usage/2-variables-and-types/1-general/g-2190.md index 7e20ff6b..47da6696 100644 --- a/docs/4-language-usage/2-variables-and-types/1-general/g-2190.md +++ b/docs/4-language-usage/2-variables-and-types/1-general/g-2190.md @@ -1,6 +1,6 @@ # G-2190: Avoid using ROWID or UROWID. -!!! warning "Major" +!!! bug "Blocker" Portability, Reliability ## Reason From 1793d1b5c185c0d17306cba6aaf6a350ab911605 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:03:38 +0200 Subject: [PATCH 09/59] change severity from "Minor" to "Major" for G-2210 and extend description to make clear that this can reduce the required resources --- .../2-variables-and-types/2-numeric-data-types/g-2210.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2210.md b/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2210.md index 4a1ff713..32871f78 100644 --- a/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2210.md +++ b/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2210.md @@ -1,11 +1,11 @@ # G-2210: Avoid declaring NUMBER variables, constants or subtypes with no precision. -!!! tip "Minor" +!!! warning "Major" Efficiency ## Reason -If you do not specify precision `number` is defaulted to 38 or the maximum supported by your system, whichever is less. You may well need all this precision, but if you know you do not, you should specify whatever matches your needs. +If you do not specify precision `number` is defaulted to 38 or the maximum supported by your system, whichever is less. You may well need all this precision, but if you know you do not, you should specify whatever matches your needs. Also, consider using a simpler data type that uses fewer resources, such as `pls_integer`. ## Example (bad) From f2358cdce1b6e52e638246ab429665c5d52b1288 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:04:04 +0200 Subject: [PATCH 10/59] change severity from "Minor" to "Critical" for G-2220 --- .../2-variables-and-types/2-numeric-data-types/g-2220.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2220.md b/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2220.md index 11c65595..cefdb618 100644 --- a/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2220.md +++ b/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2220.md @@ -1,6 +1,6 @@ # G-2220: Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values. -!!! tip "Minor" +!!! danger "Critical" Efficiency ## Reason From 66508d3f036fa1858696f27c5b1f4cd1a32a8414 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:04:30 +0200 Subject: [PATCH 11/59] change severity from "Minor" to "Critical" for G-2230 --- .../2-variables-and-types/2-numeric-data-types/g-2230.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2230.md b/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2230.md index 826e9428..f34a284f 100644 --- a/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2230.md +++ b/docs/4-language-usage/2-variables-and-types/2-numeric-data-types/g-2230.md @@ -1,6 +1,6 @@ # G-2230: Try to use SIMPLE_INTEGER datatype when appropriate. -!!! tip "Minor" +!!! danger "Critical" Efficiency ## Reason From 522a28ae3bd0ab49c041a49948fbe1f94e1ce46a Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:05:38 +0200 Subject: [PATCH 12/59] change severity from "Major" to "Blocker" for G-2320 and mention reliability (when behavior should be changed) --- .../2-variables-and-types/3-character-data-types/g-2320.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2320.md b/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2320.md index 960ba9a7..fa8634d1 100644 --- a/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2320.md +++ b/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2320.md @@ -1,7 +1,7 @@ # G-2320: Never use VARCHAR data type. -!!! warning "Major" - Portability +!!! bug "Blocker" + Portability, Reliability ## Reason From 819c2f764a67407a580a98765be84e96557010c1 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:06:53 +0200 Subject: [PATCH 13/59] change severity from "Major" to "Blocker" for G-2330 --- .../2-variables-and-types/3-character-data-types/g-2330.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2330.md b/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2330.md index 72ada8dc..a8292a8b 100644 --- a/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2330.md +++ b/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2330.md @@ -1,7 +1,7 @@ # G-2330: Never use zero-length strings to substitute NULL. -!!! warning "Major" - Portability +!!! bug "Blocker" + Portability, Reliability ## Reason From 0ab145b45e75821f44279030447702bf99f155fc Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:07:21 +0200 Subject: [PATCH 14/59] change severity from "Minor" to "Blocker" for G-2340 --- .../2-variables-and-types/3-character-data-types/g-2340.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2340.md b/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2340.md index 487eef4f..fd9bf7c1 100644 --- a/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2340.md +++ b/docs/4-language-usage/2-variables-and-types/3-character-data-types/g-2340.md @@ -1,6 +1,6 @@ # G-2340: Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored). -!!! tip "Minor" +!!! bug "Blocker" Reliability ## Reason From 12b2f0584184b647836513a7340b513564bd9171 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:07:44 +0200 Subject: [PATCH 15/59] change severity from "Major" to "Blocker" for G-3110 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3110.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3110.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3110.md index 12874e8d..60b2a2fc 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3110.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3110.md @@ -1,6 +1,6 @@ # G-3110: Always specify the target columns when coding an insert statement. -!!! warning "Major" +!!! bug "Blocker" Maintainability, Reliability ## Reason From 8881e1d5a1566919b7930252faca771e9f2cde15 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:08:01 +0200 Subject: [PATCH 16/59] change severity from "Minor" to "Blocker" for G-3115 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3115.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3115.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3115.md index 82521c82..7dbab1cc 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3115.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3115.md @@ -1,6 +1,6 @@ # G-3115: Avoid self-assigning a column. -!!! tip "Minor" +!!! bug "Blocker" Maintainability ## Reason From 7f57c7ddf3f6284ef8d7ebe728aa3c4e4e3741c7 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:08:27 +0200 Subject: [PATCH 17/59] change severity from "Minor" to "Major" for G-3130 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3130.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3130.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3130.md index 6953edcc..9b69722b 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3130.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3130.md @@ -1,6 +1,6 @@ # G-3130: Try to use ANSI SQL-92 join syntax. -!!! tip "Minor" +!!! warning "Major" Maintainability, Portability ## Reason From 7eeb9eb66b0bca34d07374947e72ccf8849f141a Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:08:58 +0200 Subject: [PATCH 18/59] change severity from "Major" to "Critical" for G-3145 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3145.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3145.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3145.md index 9d94ec5f..aa2c4437 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3145.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3145.md @@ -1,6 +1,6 @@ # G-3145: Avoid using SELECT * directly from a table or view. -!!! warning "Major" +!!! danger "Critical" Efficiency, Maintainability, Reliability, Testability ## Reason From 36cf3f989f9610c0c69cd3e2ba118cb07499078a Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:09:29 +0200 Subject: [PATCH 19/59] change severity from "Minor" to "Critical" for G-3150 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3150.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3150.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3150.md index a076009c..91669d07 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3150.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3150.md @@ -1,6 +1,6 @@ # G-3150: Try to use identity columns for surrogate keys. -!!! tip "Minor" +!!! danger "Critical" Maintainability, Reliability ## Restriction From 715f1398e5d0d0eece3bb15b76d3d4cb8d6bbf96 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:09:52 +0200 Subject: [PATCH 20/59] change severity from "Major" to "Blocker" for G-3185 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3185.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3185.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3185.md index 94783795..ed9e731e 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3185.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3185.md @@ -1,6 +1,6 @@ # G-3185: Never use ROWNUM at the same query level as ORDER BY. -!!! warning "Major" +!!! bug "Blocker" Reliability, Testability ## Reason From 9f0feeee63c5eb9ae42590ee39dff486de23a478 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:10:17 +0200 Subject: [PATCH 21/59] change severity from "Major" to "Blocker" for G-3190 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3190.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3190.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3190.md index c14e7aa4..d6f49d13 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3190.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3190.md @@ -1,6 +1,6 @@ # G-3190: Avoid using NATURAL JOIN. -!!! warning "Major" +!!! bug "Blocker" Changeability, Reliability ## Reason From 018122955d3e709615626c9ced468e91d7a1aeb7 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:11:17 +0200 Subject: [PATCH 22/59] change severity from "Minor" to "Blocker" for G-3195 --- docs/4-language-usage/3-dml-and-sql/1-general/g-3195.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/1-general/g-3195.md b/docs/4-language-usage/3-dml-and-sql/1-general/g-3195.md index b6407969..f2d6b47e 100644 --- a/docs/4-language-usage/3-dml-and-sql/1-general/g-3195.md +++ b/docs/4-language-usage/3-dml-and-sql/1-general/g-3195.md @@ -1,6 +1,6 @@ # G-3195: Always use wildcards in a LIKE clause. -!!! tip "Minor" +!!! bug "Blocker" Maintainability ## Reason From ff4533c745885a335268b4c24fbe102b2bef3640 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:11:37 +0200 Subject: [PATCH 23/59] change severity from "Major" to "Critical" for G-3219 --- docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3210.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3210.md b/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3210.md index 09cb28a0..18f4ee3a 100644 --- a/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3210.md +++ b/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3210.md @@ -1,6 +1,6 @@ # G-3210: Always use BULK OPERATIONS (BULK COLLECT, FORALL) whenever you have to execute a DML statement for more than 4 times. -!!! warning "Major" +!!! danger "Critical" Efficiency ## Reason From 07238d169ca210d2f23c1cbc2e2c58586c420d28 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:12:01 +0200 Subject: [PATCH 24/59] change severity from "Major" to "Critical" for G-3220 --- docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3220.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3220.md b/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3220.md index 45c14202..97dd7093 100644 --- a/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3220.md +++ b/docs/4-language-usage/3-dml-and-sql/2-bulk-operations/g-3220.md @@ -1,6 +1,6 @@ # G-3220: Always process saved exceptions from a FORALL statement. -!!! warning "Major" +!!! danger "Critical" Reliability, Testability ## Reason From dd9fae4f2cc8b9984a23dc231f77843a5707c002 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:12:29 +0200 Subject: [PATCH 25/59] change severity from "Critical" to "Blocker" for G-3310 --- .../3-dml-and-sql/3-transaction-control/g-3310.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/3-dml-and-sql/3-transaction-control/g-3310.md b/docs/4-language-usage/3-dml-and-sql/3-transaction-control/g-3310.md index 53a57364..25fc1cc6 100644 --- a/docs/4-language-usage/3-dml-and-sql/3-transaction-control/g-3310.md +++ b/docs/4-language-usage/3-dml-and-sql/3-transaction-control/g-3310.md @@ -1,6 +1,6 @@ # G-3310: Never commit within a cursor loop. -!!! danger "Critical" +!!! bug "Blocker" Efficiency, Reliability ## Reason From 9b10a1e4a29d19c19e163291195edae16b588df3 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:12:52 +0200 Subject: [PATCH 26/59] change severity from "Critical" to "Blocker" for G-4120 --- docs/4-language-usage/4-control-structures/1-cursor/g-4120.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/1-cursor/g-4120.md b/docs/4-language-usage/4-control-structures/1-cursor/g-4120.md index 6d1c55ee..7f9e8443 100644 --- a/docs/4-language-usage/4-control-structures/1-cursor/g-4120.md +++ b/docs/4-language-usage/4-control-structures/1-cursor/g-4120.md @@ -1,6 +1,6 @@ # G-4120: Avoid using %NOTFOUND directly after the FETCH when working with BULK OPERATIONS and LIMIT clause. -!!! danger "Critical" +!!! bug "Blocker" Reliability ## Reason From a5b6990b161b91ef0444335e414061ea69b70e81 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:13:20 +0200 Subject: [PATCH 27/59] change severity from "Major" to "Blocker" for G-4130 --- docs/4-language-usage/4-control-structures/1-cursor/g-4130.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/1-cursor/g-4130.md b/docs/4-language-usage/4-control-structures/1-cursor/g-4130.md index 624a36db..7cd79d7a 100644 --- a/docs/4-language-usage/4-control-structures/1-cursor/g-4130.md +++ b/docs/4-language-usage/4-control-structures/1-cursor/g-4130.md @@ -1,6 +1,6 @@ # G-4130: Always close locally opened cursors. -!!! warning "Major" +!!! bug "Blocker" Efficiency, Reliability ## Reason From 01a51811c65e6020733d8fe48aaae892183e0e72 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:13:46 +0200 Subject: [PATCH 28/59] change severity from "Major" to "Blocker" for G-4140 --- docs/4-language-usage/4-control-structures/1-cursor/g-4140.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/1-cursor/g-4140.md b/docs/4-language-usage/4-control-structures/1-cursor/g-4140.md index c0c8f2c0..f5c3ef5b 100644 --- a/docs/4-language-usage/4-control-structures/1-cursor/g-4140.md +++ b/docs/4-language-usage/4-control-structures/1-cursor/g-4140.md @@ -1,6 +1,6 @@ # G-4140: Avoid executing any statements between a SQL operation and the usage of an implicit cursor attribute. -!!! warning "Major" +!!! bug "Blocker" Reliability ## Reason From 5731c75ffd80e5a8b20809229773aa6a8f953690 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:14:22 +0200 Subject: [PATCH 29/59] change severity from "Major" to "Minor" for G-4210 --- .../2-case-if-decode-nvl-nvl2-coalesce/g-4210.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4210.md b/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4210.md index 6efc1fa2..f4351d7a 100644 --- a/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4210.md +++ b/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4210.md @@ -1,6 +1,6 @@ # G-4210: Try to use CASE rather than an IF statement with multiple ELSIF paths. -!!! warning "Major" +!!! tip "Minor" Maintainability, Testability ## Reason From 4144bd4504a896470adc6ace5f535c54a0072cab Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:14:42 +0200 Subject: [PATCH 30/59] change severity from "Minor" to "Major" for G-4220 --- .../2-case-if-decode-nvl-nvl2-coalesce/g-4220.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4220.md b/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4220.md index 11940b22..ddd4ffb0 100644 --- a/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4220.md +++ b/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4220.md @@ -1,6 +1,6 @@ # G-4220: Try to use CASE rather than DECODE. -!!! tip "Minor" +!!! warning "Major" Maintainability, Portability ## Reason From cb4b2f830831f930bb92c1b0378fc099f18325c1 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:15:30 +0200 Subject: [PATCH 31/59] change severity from "Major" to "Blocker" for G-4250 --- .../2-case-if-decode-nvl-nvl2-coalesce/g-4250.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4250.md b/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4250.md index ead94340..90090ceb 100644 --- a/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4250.md +++ b/docs/4-language-usage/4-control-structures/2-case-if-decode-nvl-nvl2-coalesce/g-4250.md @@ -1,6 +1,6 @@ # G-4250: Avoid using identical conditions in different branches of the same IF or CASE statement. -!!! warning "Major" +!!! bug "Blocker" Maintainability, Reliability, Testability ## Reason From 61428be378dbc440906d5d4eda123e70a0980f37 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:15:56 +0200 Subject: [PATCH 32/59] change severity from "Minor" to "Major" for G-4330 --- .../4-control-structures/3-flow-control/g-4330.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/3-flow-control/g-4330.md b/docs/4-language-usage/4-control-structures/3-flow-control/g-4330.md index 7018f644..3ccf2e78 100644 --- a/docs/4-language-usage/4-control-structures/3-flow-control/g-4330.md +++ b/docs/4-language-usage/4-control-structures/3-flow-control/g-4330.md @@ -1,6 +1,6 @@ # G-4330: Always use a CURSOR FOR loop to process the complete cursor results unless you are using bulk operations. -!!! tip "Minor" +!!! warning "Major" Maintainability ## Reason From 8136e9cb596534da17673053c7cce16a246a827a Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:17:11 +0200 Subject: [PATCH 33/59] change severity from "Minor" to "Major" for G-4340 --- .../4-control-structures/3-flow-control/g-4340.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/3-flow-control/g-4340.md b/docs/4-language-usage/4-control-structures/3-flow-control/g-4340.md index abd2e660..68f3af7f 100644 --- a/docs/4-language-usage/4-control-structures/3-flow-control/g-4340.md +++ b/docs/4-language-usage/4-control-structures/3-flow-control/g-4340.md @@ -1,6 +1,6 @@ # G-4340: Always use a NUMERIC FOR loop to process a dense array. -!!! tip "Minor" +!!! warning "Major" Maintainability ## Reason From 6697b0a8f75592b7126a9dff3a974dae6144448b Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:17:30 +0200 Subject: [PATCH 34/59] change severity from "Major" to "Blocker" for G-1030 --- .../4-control-structures/3-flow-control/g-4350.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/3-flow-control/g-4350.md b/docs/4-language-usage/4-control-structures/3-flow-control/g-4350.md index a2c96c44..8db03e4f 100644 --- a/docs/4-language-usage/4-control-structures/3-flow-control/g-4350.md +++ b/docs/4-language-usage/4-control-structures/3-flow-control/g-4350.md @@ -1,6 +1,6 @@ # G-4350: Always use 1 as lower and COUNT() as upper bound when looping through a dense array. -!!! warning "Major" +!!! bug "Blocker" Reliability ## Reason From fd4e6c5721356cde19f70774b3babc152c944178 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:18:42 +0200 Subject: [PATCH 35/59] change severity from "Minor" to "Critical" for G-4360 --- .../4-control-structures/3-flow-control/g-4360.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/3-flow-control/g-4360.md b/docs/4-language-usage/4-control-structures/3-flow-control/g-4360.md index 93134bcc..24fa9f84 100644 --- a/docs/4-language-usage/4-control-structures/3-flow-control/g-4360.md +++ b/docs/4-language-usage/4-control-structures/3-flow-control/g-4360.md @@ -1,6 +1,6 @@ # G-4360: Always use a WHILE loop to process a loose array. -!!! tip "Minor" +!!! danger "Critical" Efficiency ## Reason From 616393059edf1a25fe4fd8f1a23ca858e3c10382 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:19:11 +0200 Subject: [PATCH 36/59] change severity from "Major" to "Critical" for G-4385 --- .../4-control-structures/3-flow-control/g-4385.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/4-control-structures/3-flow-control/g-4385.md b/docs/4-language-usage/4-control-structures/3-flow-control/g-4385.md index 6294bed3..1d81a66c 100644 --- a/docs/4-language-usage/4-control-structures/3-flow-control/g-4385.md +++ b/docs/4-language-usage/4-control-structures/3-flow-control/g-4385.md @@ -1,6 +1,6 @@ # G-4385: Never use a cursor for loop to check whether a cursor returns data. -!!! warning "Major" +!!! danger "Critical" Efficiency ## Reason From 3c4ec802c72bb6c6da318d2a8d141e7aeaef7edf Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:19:38 +0200 Subject: [PATCH 37/59] change severity from "Major" to "Critical" for G-5040 --- docs/4-language-usage/5-exception-handling/g-5040.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/5-exception-handling/g-5040.md b/docs/4-language-usage/5-exception-handling/g-5040.md index 147e3a2e..b98a4d7b 100644 --- a/docs/4-language-usage/5-exception-handling/g-5040.md +++ b/docs/4-language-usage/5-exception-handling/g-5040.md @@ -1,6 +1,6 @@ # G-5040: Avoid use of WHEN OTHERS clause in an exception section without any other specific handlers. -!!! warning "Major" +!!! danger "Critical" Reliability ## Reason From 482fc56ca2c7ac6c4d4acb12812976a8679bb6be Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:20:27 +0200 Subject: [PATCH 38/59] remove space in title of G-5050 --- docs/4-language-usage/5-exception-handling/g-5050.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/5-exception-handling/g-5050.md b/docs/4-language-usage/5-exception-handling/g-5050.md index 3c28a0b9..eb66c0a5 100644 --- a/docs/4-language-usage/5-exception-handling/g-5050.md +++ b/docs/4-language-usage/5-exception-handling/g-5050.md @@ -1,4 +1,4 @@ -# G-5050: Avoid use of the RAISE_APPLICATION_ERROR built-in procedure with a hard-coded 20nnn error number or hard-coded message. +# G-5050: Avoid use of the RAISE_APPLICATION_ERROR built-in procedure with a hard-coded 20nnn error number or hard-coded message. !!! warning "Major" Changeability, Maintainability From a812ac413e00d3c95374e80d5ff9f4632c6879ff Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:20:49 +0200 Subject: [PATCH 39/59] change severity from "Critical" to "Blocker" for G-5070 --- docs/4-language-usage/5-exception-handling/g-5070.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/5-exception-handling/g-5070.md b/docs/4-language-usage/5-exception-handling/g-5070.md index a72efb1d..9beef1f9 100644 --- a/docs/4-language-usage/5-exception-handling/g-5070.md +++ b/docs/4-language-usage/5-exception-handling/g-5070.md @@ -1,6 +1,6 @@ # G-5070: Avoid using Oracle predefined exceptions. -!!! danger "Critical" +!!! bug "Blocker" Reliability ## Reason From 23264e5d4adcd4c955244b07029b1c2852eff83d Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:21:16 +0200 Subject: [PATCH 40/59] change severity from "Minor" to "Critical" for G-5080 --- docs/4-language-usage/5-exception-handling/g-5080.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/5-exception-handling/g-5080.md b/docs/4-language-usage/5-exception-handling/g-5080.md index 6837c59f..d75de554 100644 --- a/docs/4-language-usage/5-exception-handling/g-5080.md +++ b/docs/4-language-usage/5-exception-handling/g-5080.md @@ -1,6 +1,6 @@ # G-5080: Always use FORMAT_ERROR_BACKTRACE when using FORMAT_ERROR_STACK or SQLERRM. -!!! tip "Minor" +!!! danger "Critical" Maintainability, Testability ## Reason From eb50b89483f015a62f6ea7491cb6445565f8b94e Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:21:31 +0200 Subject: [PATCH 41/59] change severity from "Minor" to "Major" for G-7125 --- docs/4-language-usage/7-stored-objects/1-general/g-7125.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/1-general/g-7125.md b/docs/4-language-usage/7-stored-objects/1-general/g-7125.md index a257e0c7..01133a55 100644 --- a/docs/4-language-usage/7-stored-objects/1-general/g-7125.md +++ b/docs/4-language-usage/7-stored-objects/1-general/g-7125.md @@ -1,6 +1,6 @@ # G-7125: Always use CREATE OR REPLACE instead of CREATE alone. -!!! tip "Minor" +!!! warning "Major" Maintainability ## Reason From 7a4d86247aa78f9725dd380db4557d2de2a99515 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:21:47 +0200 Subject: [PATCH 42/59] change severity from "Minor" to "Major" for G-7150 --- docs/4-language-usage/7-stored-objects/1-general/g-7150.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/1-general/g-7150.md b/docs/4-language-usage/7-stored-objects/1-general/g-7150.md index e8efaa62..4a56646a 100644 --- a/docs/4-language-usage/7-stored-objects/1-general/g-7150.md +++ b/docs/4-language-usage/7-stored-objects/1-general/g-7150.md @@ -1,6 +1,6 @@ # G-7150: Try to remove unused parameters. -!!! tip "Minor" +!!! warning "Major" Efficiency, Maintainability ## Reason From c586263257498a4386795f75d367245b6ea1ed0c Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:22:08 +0200 Subject: [PATCH 43/59] change severity from "Minor" to "Major" for G-7210 --- docs/4-language-usage/7-stored-objects/2-packages/g-7210.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/2-packages/g-7210.md b/docs/4-language-usage/7-stored-objects/2-packages/g-7210.md index 1bee55e7..07a231f7 100644 --- a/docs/4-language-usage/7-stored-objects/2-packages/g-7210.md +++ b/docs/4-language-usage/7-stored-objects/2-packages/g-7210.md @@ -1,6 +1,6 @@ # G-7210: Try to keep your packages small. Include only few procedures and functions that are used in the same context. -!!! tip "Minor" +!!! warning "Major" Efficiency, Maintainability ## Reason From ed69e3cf4912c09948baf928a1ceb0d09b58cc21 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:22:33 +0200 Subject: [PATCH 44/59] change severity from "Minor" to "Major" for G-7250 --- docs/4-language-usage/7-stored-objects/2-packages/g-7250.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/2-packages/g-7250.md b/docs/4-language-usage/7-stored-objects/2-packages/g-7250.md index 98f16631..fe8af638 100644 --- a/docs/4-language-usage/7-stored-objects/2-packages/g-7250.md +++ b/docs/4-language-usage/7-stored-objects/2-packages/g-7250.md @@ -1,6 +1,6 @@ # G-7250: Never use RETURN in package initialization block. -!!! tip "Minor" +!!! warning "Major" Maintainability ## Reason From e39c37e31183763b6f1f33a97fccb7f7dc7cd99c Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:23:00 +0200 Subject: [PATCH 45/59] change severity from "Major" to "Blocker" for G-7330 --- docs/4-language-usage/7-stored-objects/3-procedures/g-7330.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/3-procedures/g-7330.md b/docs/4-language-usage/7-stored-objects/3-procedures/g-7330.md index 19103acc..50902f86 100644 --- a/docs/4-language-usage/7-stored-objects/3-procedures/g-7330.md +++ b/docs/4-language-usage/7-stored-objects/3-procedures/g-7330.md @@ -1,6 +1,6 @@ # G-7330: Always assign values to OUT parameters. -!!! tip "Major" +!!! bug "Blocker" Maintainability, Testability ## Reason From 71412cfec2efdf975e71d5ddcbbe2dc8bae27266 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:24:05 +0200 Subject: [PATCH 46/59] change severity from "Major" to "Blocker" for G-7450 --- docs/4-language-usage/7-stored-objects/4-functions/g-7450.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/4-functions/g-7450.md b/docs/4-language-usage/7-stored-objects/4-functions/g-7450.md index cf19207f..d26633cb 100644 --- a/docs/4-language-usage/7-stored-objects/4-functions/g-7450.md +++ b/docs/4-language-usage/7-stored-objects/4-functions/g-7450.md @@ -1,6 +1,6 @@ # G-7450: Never return a NULL value from a BOOLEAN function. -!!! warning "Major" +!!! bug "Blocker" Reliability, Testability ## Reason From 0346b52760bb8d0705dc7f91edd380e2d6aee9cf Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:24:26 +0200 Subject: [PATCH 47/59] change severity from "Major" to "Critical" for G-7740 --- docs/4-language-usage/7-stored-objects/7-triggers/g-7740.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/7-triggers/g-7740.md b/docs/4-language-usage/7-stored-objects/7-triggers/g-7740.md index 8da18969..92db74cc 100644 --- a/docs/4-language-usage/7-stored-objects/7-triggers/g-7740.md +++ b/docs/4-language-usage/7-stored-objects/7-triggers/g-7740.md @@ -1,6 +1,6 @@ # G-7740: Never handle multiple DML events per trigger if primary key is assigned in trigger. -!!! warning "Major" +!!! danger "Critical" Efficiency, Reliability !!! missing "Unsupported in db\* CODECOP Validators" From 940fd8b838878d95c13b70157d8c196ee4977a79 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:24:47 +0200 Subject: [PATCH 48/59] change severity from "Major" to "Critical" for G-7810 --- docs/4-language-usage/7-stored-objects/8-sequences/g-7810.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/8-sequences/g-7810.md b/docs/4-language-usage/7-stored-objects/8-sequences/g-7810.md index 874247a2..bb74db5a 100644 --- a/docs/4-language-usage/7-stored-objects/8-sequences/g-7810.md +++ b/docs/4-language-usage/7-stored-objects/8-sequences/g-7810.md @@ -1,6 +1,6 @@ # G-7810: Never use SQL inside PL/SQL to read sequence numbers (or SYSDATE). -!!! warning "Major" +!!! danger "Critical" Efficiency, Maintainability ## Reason From 88f9e8dc2d10689011d41c46192f065e7b2f1f5e Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:25:12 +0200 Subject: [PATCH 49/59] change severity from "Critical" to "Blocker" for G-7910 --- docs/4-language-usage/7-stored-objects/9-sql-macros/g-7910.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/7-stored-objects/9-sql-macros/g-7910.md b/docs/4-language-usage/7-stored-objects/9-sql-macros/g-7910.md index 47f37bb7..f25e530c 100644 --- a/docs/4-language-usage/7-stored-objects/9-sql-macros/g-7910.md +++ b/docs/4-language-usage/7-stored-objects/9-sql-macros/g-7910.md @@ -1,6 +1,6 @@ # G-7910: Never use DML within a SQL macro. -!!! danger "Critical" +!!! bug "Blocker" Reliability, Testability ## Restriction From 12c118ae0959727a9a52561e5309a3b8bf8a09ce Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:25:36 +0200 Subject: [PATCH 50/59] change severity from "Major" to "Critical" for G-8110 --- .../8-patterns/1-checking-the-number-of-rows/g-8110.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8110.md b/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8110.md index 3d007408..8407b9ae 100644 --- a/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8110.md +++ b/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8110.md @@ -1,6 +1,6 @@ # G-8110: Never use SELECT COUNT(*) if you are only interested in the existence of a row. -!!! warning "Major" +!!! danger "Critical" Efficiency ## Reason From 59e9c85c64fb4d0a9747414a7255ff75cd70c3a0 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:25:58 +0200 Subject: [PATCH 51/59] change severity from "Majro" to "Critical" for G-8120 --- .../8-patterns/1-checking-the-number-of-rows/g-8120.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8120.md b/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8120.md index 66103b04..959c009a 100644 --- a/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8120.md +++ b/docs/4-language-usage/8-patterns/1-checking-the-number-of-rows/g-8120.md @@ -1,6 +1,6 @@ # G-8120: Never check existence of a row to decide whether to create it or not. -!!! warning "Major" +!!! danger "Critical" Efficiency, Reliability ## Reason From f33aa54e026449df87e9d0cb849766257c884308 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:26:49 +0200 Subject: [PATCH 52/59] change severity from "Major" to "Minor" for G-8210 and remove duplicate space in reason --- .../2-access-objects-of-foreign-application-schemas/g-8210.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/4-language-usage/8-patterns/2-access-objects-of-foreign-application-schemas/g-8210.md b/docs/4-language-usage/8-patterns/2-access-objects-of-foreign-application-schemas/g-8210.md index e51c03f6..88726ca3 100644 --- a/docs/4-language-usage/8-patterns/2-access-objects-of-foreign-application-schemas/g-8210.md +++ b/docs/4-language-usage/8-patterns/2-access-objects-of-foreign-application-schemas/g-8210.md @@ -1,11 +1,11 @@ # G-8210: Always use synonyms when accessing objects of another application schema. -!!! warning "Major" +!!! tip "Minor" Changeability, Maintainability ## Reason -If a connection is needed to a table that is placed in a foreign schema, using synonyms is a good choice. If there are structural changes to that table (e.g. the table name changes or the table changes into another schema) only the synonym has to be changed no changes to the package are needed (single point of change). If you only have read access for a table inside another schema, or there is another reason that does not allow you to change data in this table, you can switch the synonym to a table in your own schema. This is also good practice for testers working on test systems. +If a connection is needed to a table that is placed in a foreign schema, using synonyms is a good choice. If there are structural changes to that table (e.g. the table name changes or the table changes into another schema) only the synonym has to be changed no changes to the package are needed (single point of change). If you only have read access for a table inside another schema, or there is another reason that does not allow you to change data in this table, you can switch the synonym to a table in your own schema. This is also good practice for testers working on test systems. ## Example (bad) From fd1453bc3b6058c52450018a25b3911d73e1d1d3 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:27:11 +0200 Subject: [PATCH 53/59] change severity from "Minor" to "Major" for G-8310 --- .../8-patterns/3-validating-input-parameter-size/g-8310.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/8-patterns/3-validating-input-parameter-size/g-8310.md b/docs/4-language-usage/8-patterns/3-validating-input-parameter-size/g-8310.md index c5d671de..e0a32387 100644 --- a/docs/4-language-usage/8-patterns/3-validating-input-parameter-size/g-8310.md +++ b/docs/4-language-usage/8-patterns/3-validating-input-parameter-size/g-8310.md @@ -1,6 +1,6 @@ # G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. -!!! tip "Minor" +!!! warning "Major" Maintainability, Reliability, Reusability, Testability ## Reason From cf107f21a39275e9c73963f04b36ad7d44c97d6a Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:27:42 +0200 Subject: [PATCH 54/59] change severity from "Minor" to "Blocker" for G-8410 --- .../g-8410.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/8-patterns/4-ensure-single-execution-at-a-time-of-a-program-unit/g-8410.md b/docs/4-language-usage/8-patterns/4-ensure-single-execution-at-a-time-of-a-program-unit/g-8410.md index 43041921..f7b41e97 100644 --- a/docs/4-language-usage/8-patterns/4-ensure-single-execution-at-a-time-of-a-program-unit/g-8410.md +++ b/docs/4-language-usage/8-patterns/4-ensure-single-execution-at-a-time-of-a-program-unit/g-8410.md @@ -1,6 +1,6 @@ # G-8410: Always use application locks to ensure a program unit is only running once at a given time. -!!! tip "Minor" +!!! bug "Blocker" Efficiency, Reliability !!! missing "Unsupported in db\* CODECOP Validators" From 3e30bfc85c34b5a7b717a162e5d3206d2e426866 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:28:51 +0200 Subject: [PATCH 55/59] change severity from "Minor" to "Critical" for G-8510 --- .../g-8510.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/8-patterns/5-use-dbms-application-info-package-to-follow-progress-of-a-process/g-8510.md b/docs/4-language-usage/8-patterns/5-use-dbms-application-info-package-to-follow-progress-of-a-process/g-8510.md index 4187dc4d..ccb38196 100644 --- a/docs/4-language-usage/8-patterns/5-use-dbms-application-info-package-to-follow-progress-of-a-process/g-8510.md +++ b/docs/4-language-usage/8-patterns/5-use-dbms-application-info-package-to-follow-progress-of-a-process/g-8510.md @@ -1,6 +1,6 @@ # G-8510: Always use dbms_application_info to track program process transiently. -!!! tip "Minor" +!!! danger "Critical" Efficiency, Reliability !!! missing "Unsupported in db\* CODECOP Validators" From 1449d6b18373e98e7af22441a5e5c38f64c0cc6f Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:29:38 +0200 Subject: [PATCH 56/59] change severity from "Major" to "Blocker" for G-9010 --- docs/4-language-usage/9-function-usage/g-9010.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/9-function-usage/g-9010.md b/docs/4-language-usage/9-function-usage/g-9010.md index fddffeb7..f4b82e56 100644 --- a/docs/4-language-usage/9-function-usage/g-9010.md +++ b/docs/4-language-usage/9-function-usage/g-9010.md @@ -1,6 +1,6 @@ # G-9010: Always use a format model in string to date/time conversion functions. -!!! warning "Major" +!!! bug "Blocker" Changeability, Maintainability, Reliability, Security, Testability ## Reason From 40d8435a9bd5223289c9312f70655a8d269807ed Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:29:58 +0200 Subject: [PATCH 57/59] change severity from "Minor" to "Major" for G-9030 --- docs/4-language-usage/9-function-usage/g-9030.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/9-function-usage/g-9030.md b/docs/4-language-usage/9-function-usage/g-9030.md index 0ba0404c..f612317f 100644 --- a/docs/4-language-usage/9-function-usage/g-9030.md +++ b/docs/4-language-usage/9-function-usage/g-9030.md @@ -1,6 +1,6 @@ # G-9030: Try to define a default value on conversion errors. -!!! tip "Minor" +!!! warning "Major" Maintainability, Reliability, Testability ## Restriction From 06af7dafa6ba0623bfe5c02600e2c6f3e3aa4ef1 Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:30:14 +0200 Subject: [PATCH 58/59] change severity from "Minor" to "Major" for G-9040 --- docs/4-language-usage/9-function-usage/g-9040.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/4-language-usage/9-function-usage/g-9040.md b/docs/4-language-usage/9-function-usage/g-9040.md index 557c5647..27b46525 100644 --- a/docs/4-language-usage/9-function-usage/g-9040.md +++ b/docs/4-language-usage/9-function-usage/g-9040.md @@ -1,6 +1,6 @@ # G-9040: Try using FX in string to date/time conversion format model to avoid fuzzy conversion. -!!! tip "Minor" +!!! warning "Major" Reliability, Testability ## Reason From bc5a30db807303b47c06d0a02126a8da931ebaae Mon Sep 17 00:00:00 2001 From: Philipp Salvisberg Date: Fri, 8 Sep 2023 17:55:20 +0200 Subject: [PATCH 59/59] update severities in appendix --- docs/9-appendix/appendix.md | 114 ++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/docs/9-appendix/appendix.md b/docs/9-appendix/appendix.md index f9a0ed77..d38d79fe 100644 --- a/docs/9-appendix/appendix.md +++ b/docs/9-appendix/appendix.md @@ -16,122 +16,122 @@ Old
Id | New
Id | Text | Severity | Change-
ability | Effi-
cien :---: | :---: | :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: 1 | 1010 | Try to label your sub blocks. | Minor | | | ✘ | | | | | 2 | 1020 | Always have a matching loop or block label. | Minor | | | ✘ | | | | | -3 | 1030 | Avoid defining variables that are not used. | Minor | | ✘ | ✘ | | | | | -4 | 1040 | Avoid dead code. | Minor | | | ✘ | | | | | +3 | 1030 | Avoid defining variables that are not used. | Major | | ✘ | ✘ | | | | | +4 | 1040 | Avoid dead code. | Major | | | ✘ | | | | | 5 | 1050 | Avoid using literals in your code. | Minor | ✘ | | | | | | | -6 | 1060 | Avoid storing ROWIDs or UROWIDs in database tables. | Major | | | | | ✘ | | | +6 | 1060 | Avoid storing ROWIDs or UROWIDs in database tables. | Critical | | | | | ✘ | | | 7 | 1070 | Avoid nesting comment blocks. | Minor | | | ✘ | | | | | -n/a | 1080 | Avoid using the same expression on both sides of a relational comparison operator or a logical operator. | Minor | | ✘ | ✘ | | | | | ✘ +n/a | 1080 | Avoid using the same expression on both sides of a relational comparison operator or a logical operator. | Blocker | | ✘ | ✘ | | | | | ✘ 8 | 2110 | Try to use anchored declarations for variables, constants and types. | Major | | | ✘ | | ✘ | | | 9 | 2120 | Try to have a single location to define your types. | Minor | ✘ | | | | | | | 10 | 2130 | Try to use subtypes for constructs used often in your code. | Minor | ✘ | | | | | | | n/a | 2135 | Avoid assigning values to local variables that are not used by a subsequent statement. | Major | | ✘ | ✘ | | | | | ✘ 11 | 2140 | Never initialize variables with NULL. | Minor | | | ✘ | | | | | -n/a | 2145 | Never self-assign a variable. | Minor | | | ✘ | | | | | +n/a | 2145 | Never self-assign a variable. | Blocker | | | ✘ | | | | | 12 | 2150 | Avoid comparisons with NULL value, consider using IS [NOT] NULL. | Blocker | | | | ✘ | ✘ | | | 13 | 2160 | Avoid initializing variables using functions in the declaration section. | Critical | | | | | ✘ | | | 14 | 2170 | Never overload variables. | Major | | | | | ✘ | | | 15 | 2180 | Never use quoted identifiers. | Major | | | ✘ | | | | | -16 | 2185 | Avoid using overly short names for explicitly or implicitly declared identifiers. | Minor | | | ✘ | | | | | -17 | 2190 | Avoid using ROWID or UROWID. | Major | | | | ✘ | ✘ | | | -18 | 2210 | Avoid declaring NUMBER variables, constants or subtypes with no precision. | Minor | | ✘ | | | | | | -19 | 2220 | Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values. | Minor | | ✘ | | | | | | -n/a | 2230 | Try to use SIMPLE_INTEGER datatype when appropriate. | Minor | | ✘ | | | | | | +16 | 2185 | Avoid using overly short names for explicitly or implicitly declared identifiers. | Major | | | ✘ | | | | | +17 | 2190 | Avoid using ROWID or UROWID. | Blocker | | | | ✘ | ✘ | | | +18 | 2210 | Avoid declaring NUMBER variables, constants or subtypes with no precision. | Major | | ✘ | | | | | | +19 | 2220 | Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values. | Critical | | ✘ | | | | | | +n/a | 2230 | Try to use SIMPLE_INTEGER datatype when appropriate. | Critical | | ✘ | | | | | | 20 | 2310 | Avoid using CHAR data type. | Major | | | | | ✘ | | | -21 | 2320 | Never use VARCHAR data type. | Major | | | | ✘ | | | | -22 | 2330 | Never use zero-length strings to substitute NULL. | Major | | | | ✘ | | | | -23 | 2340 | Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored). | Minor | | | | | ✘ | | | +21 | 2320 | Never use VARCHAR data type. | Blocker | | | | ✘ | ✘ | | | +22 | 2330 | Never use zero-length strings to substitute NULL. | Blocker | | | | ✘ | ✘ | | | +23 | 2340 | Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored). | Blocker | | | | | ✘ | | | 24 | 2410 | Try to use boolean data type for values with dual meaning. | Minor | | | ✘ | | | | | 25 | 2510 | Avoid using the LONG and LONG RAW data types. | Major | | | | ✘ | | | | n/a | 2610 | Never use self-defined weak ref cursor types. | Minor | ✘ | | ✘ | ✘ | | ✘ | | -26 | 3110 | Always specify the target columns when coding an insert statement. | Major | | | ✘ | | ✘ | | | -n/a | 3115 | Avoid self-assigning a column. | Minor | | | ✘ | | | | | +26 | 3110 | Always specify the target columns when coding an insert statement. | Blocker | | | ✘ | | ✘ | | | +n/a | 3115 | Avoid self-assigning a column. | Blocker | | | ✘ | | | | | 27 | 3120 | Always use table aliases when your SQL statement involves more than one source. | Major | | | ✘ | | | | | -28 | 3130 | Try to use ANSI SQL-92 join syntax. | Minor | | | ✘ | ✘ | | | | +28 | 3130 | Try to use ANSI SQL-92 join syntax. | Major | | | ✘ | ✘ | | | | 29 | 3140 | Try to use anchored records as targets for your cursors. | Major | | | ✘ | | ✘ | | | -n/a | 3145 | Avoid using SELECT * directly from a table or view. | Major | | ✘ | ✘ | | ✘ | | | ✘ -n/a | 3150 | Try to use identity columns for surrogate keys. | Minor | | | ✘ | | ✘ | | | +n/a | 3145 | Avoid using SELECT * directly from a table or view. | Critical | | ✘ | ✘ | | ✘ | | | ✘ +n/a | 3150 | Try to use identity columns for surrogate keys. | Critical | | | ✘ | | ✘ | | | n/a | 3160 | Avoid visible virtual columns. | Major | | | ✘ | | ✘ | | | n/a | 3170 | Always use DEFAULT ON NULL declarations to assign default values to table columns if you refuse to store NULL values. | Major | | | | | ✘ | | | n/a | 3180 | Always specify column names instead of positional references in ORDER BY clauses. | Major | ✘ | | | | ✘ | | | -n/a | 3185 | Never use ROWNUM at the same query level as ORDER BY. | Major | | | | | ✘ | | | ✘ -n/a | 3190 | Avoid using NATURAL JOIN. | Major | ✘ | | | | ✘ | | | -n/a | 3195 | Always use wildcards in a LIKE clause. | Minor | | | ✘ | | | | | -30 | 3210 | Always use BULK OPERATIONS (BULK COLLECT, FORALL) whenever you have to execute a DML statement for more than 4 times. | Major | | ✘ | | | | | | -n/a | 3220 | Always process saved exceptions from a FORALL statement. | Major | | | | | ✘ | | | ✘ -n/a | 3310 | Never commit within a cursor loop. | Critical | | ✘ | | | ✘ | | | +n/a | 3185 | Never use ROWNUM at the same query level as ORDER BY. | Blocker | | | | | ✘ | | | ✘ +n/a | 3190 | Avoid using NATURAL JOIN. | Blocker | ✘ | | | | ✘ | | | +n/a | 3195 | Always use wildcards in a LIKE clause. | Blocker | | | ✘ | | | | | +30 | 3210 | Always use BULK OPERATIONS (BULK COLLECT, FORALL) whenever you have to execute a DML statement for more than 4 times. | Critical | | ✘ | | | | | | +n/a | 3220 | Always process saved exceptions from a FORALL statement. | Critical | | | | | ✘ | | | ✘ +n/a | 3310 | Never commit within a cursor loop. | Blocker | | ✘ | | | ✘ | | | n/a | 3320 | Try to move transactions within a non-cursor loop into procedures. | Major | | | ✘ | | | ✘ | | ✘ 31 | 4110 | Always use %NOTFOUND instead of NOT %FOUND to check whether a cursor returned data. | Minor | | | ✘ | | | | | -32 | 4120 | Avoid using %NOTFOUND directly after the FETCH when working with BULK OPERATIONS and LIMIT clause. | Critical | | | | | ✘ | | | -33 | 4130 | Always close locally opened cursors. | Major | | ✘ | | | ✘ | | | -34 | 4140 | Avoid executing any statements between a SQL operation and the usage of an implicit cursor attribute. | Major | | | | | ✘ | | | -35 | 4210 | Try to use CASE rather than an IF statement with multiple ELSIF paths. | Major | | | ✘ | | | | | ✘ -36 | 4220 | Try to use CASE rather than DECODE. | Minor | | | ✘ | ✘ | | | | +32 | 4120 | Avoid using %NOTFOUND directly after the FETCH when working with BULK OPERATIONS and LIMIT clause. | Blocker | | | | | ✘ | | | +33 | 4130 | Always close locally opened cursors. | Blocker | | ✘ | | | ✘ | | | +34 | 4140 | Avoid executing any statements between a SQL operation and the usage of an implicit cursor attribute. | Blocker | | | | | ✘ | | | +35 | 4210 | Try to use CASE rather than an IF statement with multiple ELSIF paths. | Minor | | | ✘ | | | | | ✘ +36 | 4220 | Try to use CASE rather than DECODE. | Major | | | ✘ | ✘ | | | | 37 | 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 | | ✘ | | | ✘ | | | 38 | 4240 | Always use a CASE instead of a NVL2 command if parameter 2 or 3 of NVL2 is either a function call or a SELECT statement. | Critical | | ✘ | | | ✘ | | | -n/a | 4250 | Avoid using identical conditions in different branches of the same IF or CASE statement. | Major | | | ✘ | | ✘ | | | ✘ +n/a | 4250 | Avoid using identical conditions in different branches of the same IF or CASE statement. | Blocker | | | ✘ | | ✘ | | | ✘ n/a | 4260 | Avoid inverting boolean conditions with NOT. | Minor | | | ✘ | | | | | ✘ n/a | 4270 | Avoid comparing boolean values to boolean literals. | Minor | | | ✘ | | | | | ✘ 39 | 4310 | Never use GOTO statements in your code. | Major | | | ✘ | | | | | ✘ 40 | 4320 | Always label your loops. | Minor | | | ✘ | | | | | n/a | 4325 | Never reuse labels in inner scopes. | Major | | | ✘ | | ✘ | | | ✘ -41 | 4330 | Always use a CURSOR FOR loop to process the complete cursor results unless you are using bulk operations. | Minor | | | ✘ | | | | | -42 | 4340 | Always use a NUMERIC FOR loop to process a dense array. | Minor | | | ✘ | | | | | -43 | 4350 | Always use 1 as lower and COUNT() as upper bound when looping through a dense array. | Major | | | | | ✘ | | | -44 | 4360 | Always use a WHILE loop to process a loose array. | Minor | | ✘ | | | | | | +41 | 4330 | Always use a CURSOR FOR loop to process the complete cursor results unless you are using bulk operations. | Major | | | ✘ | | | | | +42 | 4340 | Always use a NUMERIC FOR loop to process a dense array. | Major | | | ✘ | | | | | +43 | 4350 | Always use 1 as lower and COUNT() as upper bound when looping through a dense array. | Blocker | | | | | ✘ | | | +44 | 4360 | Always use a WHILE loop to process a loose array. | Critical | | ✘ | | | | | | n/a | 4365 | Never use unconditional CONTINUE or EXIT in a loop. | Major | | | ✘ | | | | | ✘ 45 | 4370 | Avoid using EXIT to stop loop processing unless you are in a basic loop. | Major | | | ✘ | | | | | 46 | 4375 | Always use EXIT WHEN instead of an IF statement to exit from a loop. | Minor | | | ✘ | | | | | 47 | 4380 | Try to label your EXIT WHEN statements. | Minor | | | ✘ | | | | | -48 | 4385 | Never use a cursor for loop to check whether a cursor returns data. | Major | | ✘ | | | | | | +48 | 4385 | Never use a cursor for loop to check whether a cursor returns data. | Critical | | ✘ | | | | | | 49 | 4390 | Avoid use of unreferenced FOR loop indexes. | Major | | ✘ | | | | | | 50 | 4395 | Avoid hard-coded upper or lower bound values with FOR loops. | Minor | ✘ | | ✘ | | | | | n/a | 5010 | Try to use a error/logging framework for your application. | Critical | | | | | ✘ | ✘ | | ✘ 51 | 5020 | Never handle unnamed exceptions using the error number. | Critical | | | ✘ | | | | | 52 | 5030 | Never assign predefined exception names to user defined exceptions. | Blocker | | | | | ✘ | | | ✘ -53 | 5040 | Avoid use of WHEN OTHERS clause in an exception section without any other specific handlers. | Major | | | | | ✘ | | | +53 | 5040 | Avoid use of WHEN OTHERS clause in an exception section without any other specific handlers. | Critical | | | | | ✘ | | | 54 | n/a | Avoid use of EXCEPTION_INIT pragma for a 20nnn error. | Major | | | | | ✘ | | | -55 | 5050 | Avoid use of the RAISE_APPLICATION_ERROR built-in procedure with a hard-coded 20nnn error number or hard-coded message. | Major | ✘ | | ✘ | | | | | +55 | 5050 | Avoid use of the RAISE_APPLICATION_ERROR built-in procedure with a hard-coded 20nnn error number or hard-coded message. | Major | ✘ | | ✘ | | | | | 56 | 5060 | Avoid unhandled exceptions. | Major | | | | | ✘ | | | -57 | 5070 | Avoid using Oracle predefined exceptions. | Critical | | | | | ✘ | | | -n/a | 5080 | Always use FORMAT_ERROR_BACKTRACE when using FORMAT_ERROR_STACK or SQLERRM. | Minor | | | ✘ | | | | | ✘ +57 | 5070 | Avoid using Oracle predefined exceptions. | Blocker | | | | | ✘ | | | +n/a | 5080 | Always use FORMAT_ERROR_BACKTRACE when using FORMAT_ERROR_STACK or SQLERRM. | Critical | | | ✘ | | | | | ✘ 58 | 6010 | Always use a character variable to execute dynamic SQL. | Major | | | ✘ | | | | | ✘ 59 | 6020 | Try to use output bind arguments in the RETURNING INTO clause of dynamic DML statements rather than the USING clause. | Minor | | | ✘ | | | | | 60 | 7110 | Try to use named notation when calling program units. | Major | ✘ | | ✘ | | | | | 61 | 7120 | Always add the name of the program unit to its end keyword. | Minor | | | ✘ | | | | | -n/a | 7125 | Always use CREATE OR REPLACE instead of CREATE alone. | Minor | | | ✘ | | | | | +n/a | 7125 | Always use CREATE OR REPLACE instead of CREATE alone. | Major | | | ✘ | | | | | 62 | 7130 | Always use parameters or pull in definitions rather than referencing external variables in a local program unit. | Major | | | ✘ | | ✘ | | | ✘ 63 | 7140 | Always ensure that locally defined procedures or functions are referenced. | Major | | | ✘ | | ✘ | | | -64 | 7150 | Try to remove unused parameters. | Minor | | ✘ | ✘ | | | | | +64 | 7150 | Try to remove unused parameters. | Major | | ✘ | ✘ | | | | | 68 | 7160 | Always explicitly state parameter mode. | Major | | | ✘ | | | | | n/a | 7170 | Avoid using an IN OUT parameter as IN or OUT only. | Major | | ✘ | ✘ | | | | | -65 | 7210 | Try to keep your packages small. Include only few procedures and functions that are used in the same context. | Minor | | ✘ | ✘ | | | | | +65 | 7210 | Try to keep your packages small. Include only few procedures and functions that are used in the same context. | Major | | ✘ | ✘ | | | | | 66 | 7220 | Always use forward declaration for private functions and procedures. | Minor | ✘ | | | | | | | 67 | 7230 | Avoid declaring global variables public. | Major | | | | | ✘ | | | -n/a | 7250 | Never use RETURN in package initialization block. | Minor | | | ✘ | | | | | +n/a | 7250 | Never use RETURN in package initialization block. | Major | | | ✘ | | | | | 69 | 7310 | Avoid standalone procedures – put your procedures in packages. | Minor | | | ✘ | | | | | 70 | 7320 | Avoid using RETURN statements in a PROCEDURE. | Major | | | ✘ | | | | | ✘ -n/a | 7330 | Always assign values to OUT parameters. | Major | | | ✘ | | | | | ✘ +n/a | 7330 | Always assign values to OUT parameters. | Blocker | | | ✘ | | | | | ✘ 71 | 7410 | Avoid standalone functions – put your functions in packages. | Minor | | | ✘ | | | | | 73 | 7420 | Always make the RETURN statement the last statement of your function. | Major | | | ✘ | | | | | 72 | 7430 | Try to use no more than one RETURN statement within a function. | Major | | | ✘ | | | | | ✘ 74 | 7440 | Never use OUT parameters to return values from a function. | Major | | | | | | ✘ | | -75 | 7450 | Never return a NULL value from a BOOLEAN function. | Major | | | | | ✘ | | | ✘ +75 | 7450 | Never return a NULL value from a BOOLEAN function. | Blocker | | | | | ✘ | | | ✘ n/a | 7460 | Try to define your packaged/standalone function deterministic if appropriate. | Major | | ✘ | | | | | | 76 | 7510 | Always prefix Oracle supplied packages with owner schema name. | Major | | | | | | | ✘ | 77 | 7710 | Avoid cascading triggers. | Major | | | ✘ | | | | | ✘ n/a | 7720 | Never use multiple UPDATE OF in trigger event clause. | Blocker | | | ✘ | | ✘ | | | ✘ n/a | 7730 | Avoid multiple DML events per trigger. | Minor | | | ✘ | | | | | ✘ -n/a | 7740 | Never handle multiple DML events per trigger if primary key is assigned in trigger. | Major | | ✘ | | | ✘ | | | -n/a | 7810 | Never use SQL inside PL/SQL to read sequence numbers (or SYSDATE). | Major | | ✘ | ✘ | | | | | -n/a | 7910 | Never use DML within a SQL macro. | Critical | | | | | ✘ | | | ✘ -78 | 8110 | Never use SELECT COUNT(*) if you are only interested in the existence of a row. | Major | | ✘ | | | | | | -n/a | 8120 | Never check existence of a row to decide whether to create it or not. | Major | | ✘ | | | ✘ | | | -79 | 8210 | Always use synonyms when accessing objects of another application schema. | Major | ✘ | | ✘ | | | | | -n/a | 8310 | Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | Minor | | | ✘ | | ✘ | ✘ | | ✘ -n/a | 8410 | Always use application locks to ensure a program unit is only running once at a given time. | Minor | | ✘ | | | ✘ | | | -n/a | 8510 | Always use dbms_application_info to track program process transiently. | Minor | | ✘ | | | ✘ | | | -n/a | 9010 | Always use a format model in string to date/time conversion functions. | Major | ✘ | | ✘ | | ✘ | | ✘ | ✘ +n/a | 7740 | Never handle multiple DML events per trigger if primary key is assigned in trigger. | Critical | | ✘ | | | ✘ | | | +n/a | 7810 | Never use SQL inside PL/SQL to read sequence numbers (or SYSDATE). | Critical | | ✘ | ✘ | | | | | +n/a | 7910 | Never use DML within a SQL macro. | Blocker | | | | | ✘ | | | ✘ +78 | 8110 | Never use SELECT COUNT(*) if you are only interested in the existence of a row. | Critical | | ✘ | | | | | | +n/a | 8120 | Never check existence of a row to decide whether to create it or not. | Critical | | ✘ | | | ✘ | | | +79 | 8210 | Always use synonyms when accessing objects of another application schema. | Minor | ✘ | | ✘ | | | | | +n/a | 8310 | Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | Major | | | ✘ | | ✘ | ✘ | | ✘ +n/a | 8410 | Always use application locks to ensure a program unit is only running once at a given time. | Blocker | | ✘ | | | ✘ | | | +n/a | 8510 | Always use dbms_application_info to track program process transiently. | Critical | | ✘ | | | ✘ | | | +n/a | 9010 | Always use a format model in string to date/time conversion functions. | Blocker | ✘ | | ✘ | | ✘ | | ✘ | ✘ n/a | 9020 | Try to use a format model and NLS_NUMERIC_CHARACTERS in string to number conversion functions. | Major | ✘ | | ✘ | | ✘ | | ✘ | ✘ -n/a | 9030 | Try to define a default value on conversion errors. | Minor | | | ✘ | | ✘ | | | ✘ -n/a | 9040 | Try using FX in string to date/time conversion format model to avoid fuzzy conversion. | Minor | | | | | ✘ | | | ✘ +n/a | 9030 | Try to define a default value on conversion errors. | Major | | | ✘ | | ✘ | | | ✘ +n/a | 9040 | Try using FX in string to date/time conversion format model to avoid fuzzy conversion. | Major | | | | | ✘ | | | ✘