Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
fe43b66
extend severity descriptions to make distinction clearer
PhilippSalvisberg Sep 8, 2023
ae9375f
change severity from "Minor" to "Major" for G-1030
PhilippSalvisberg Sep 8, 2023
3477a22
change severity from "Minor" to "Major" for G-1040
PhilippSalvisberg Sep 8, 2023
0e4bb2d
change severity from "Major" to "Critical" for G-1060
PhilippSalvisberg Sep 8, 2023
dc6199a
change severity from "Minor" to "Blocker" for G-1080
PhilippSalvisberg Sep 8, 2023
e8a61d2
change severity from "Minor" to "Blocker" for G-21445
PhilippSalvisberg Sep 8, 2023
3614824
change severity from "Minor" to "Major" for G-2185
PhilippSalvisberg Sep 8, 2023
930b7bc
change severity from "Major" to "Blocker" for G-2190
PhilippSalvisberg Sep 8, 2023
1793d1b
change severity from "Minor" to "Major" for G-2210 and extend descrip…
PhilippSalvisberg Sep 8, 2023
f2358cd
change severity from "Minor" to "Critical" for G-2220
PhilippSalvisberg Sep 8, 2023
66508d3
change severity from "Minor" to "Critical" for G-2230
PhilippSalvisberg Sep 8, 2023
522a28a
change severity from "Major" to "Blocker" for G-2320 and mention reli…
PhilippSalvisberg Sep 8, 2023
819c2f7
change severity from "Major" to "Blocker" for G-2330
PhilippSalvisberg Sep 8, 2023
0ab145b
change severity from "Minor" to "Blocker" for G-2340
PhilippSalvisberg Sep 8, 2023
12b2f05
change severity from "Major" to "Blocker" for G-3110
PhilippSalvisberg Sep 8, 2023
8881e1d
change severity from "Minor" to "Blocker" for G-3115
PhilippSalvisberg Sep 8, 2023
7f57c7d
change severity from "Minor" to "Major" for G-3130
PhilippSalvisberg Sep 8, 2023
7eeb9eb
change severity from "Major" to "Critical" for G-3145
PhilippSalvisberg Sep 8, 2023
36cf3f9
change severity from "Minor" to "Critical" for G-3150
PhilippSalvisberg Sep 8, 2023
715f139
change severity from "Major" to "Blocker" for G-3185
PhilippSalvisberg Sep 8, 2023
9f0feee
change severity from "Major" to "Blocker" for G-3190
PhilippSalvisberg Sep 8, 2023
0181229
change severity from "Minor" to "Blocker" for G-3195
PhilippSalvisberg Sep 8, 2023
ff4533c
change severity from "Major" to "Critical" for G-3219
PhilippSalvisberg Sep 8, 2023
07238d1
change severity from "Major" to "Critical" for G-3220
PhilippSalvisberg Sep 8, 2023
dd9fae4
change severity from "Critical" to "Blocker" for G-3310
PhilippSalvisberg Sep 8, 2023
9b10a1e
change severity from "Critical" to "Blocker" for G-4120
PhilippSalvisberg Sep 8, 2023
a5b6990
change severity from "Major" to "Blocker" for G-4130
PhilippSalvisberg Sep 8, 2023
01a5181
change severity from "Major" to "Blocker" for G-4140
PhilippSalvisberg Sep 8, 2023
5731c75
change severity from "Major" to "Minor" for G-4210
PhilippSalvisberg Sep 8, 2023
4144bd4
change severity from "Minor" to "Major" for G-4220
PhilippSalvisberg Sep 8, 2023
cb4b2f8
change severity from "Major" to "Blocker" for G-4250
PhilippSalvisberg Sep 8, 2023
61428be
change severity from "Minor" to "Major" for G-4330
PhilippSalvisberg Sep 8, 2023
8136e9c
change severity from "Minor" to "Major" for G-4340
PhilippSalvisberg Sep 8, 2023
6697b0a
change severity from "Major" to "Blocker" for G-1030
PhilippSalvisberg Sep 8, 2023
fd4e6c5
change severity from "Minor" to "Critical" for G-4360
PhilippSalvisberg Sep 8, 2023
6163930
change severity from "Major" to "Critical" for G-4385
PhilippSalvisberg Sep 8, 2023
3c4ec80
change severity from "Major" to "Critical" for G-5040
PhilippSalvisberg Sep 8, 2023
482fc56
remove space in title of G-5050
PhilippSalvisberg Sep 8, 2023
a812ac4
change severity from "Critical" to "Blocker" for G-5070
PhilippSalvisberg Sep 8, 2023
23264e5
change severity from "Minor" to "Critical" for G-5080
PhilippSalvisberg Sep 8, 2023
eb50b89
change severity from "Minor" to "Major" for G-7125
PhilippSalvisberg Sep 8, 2023
7a4d862
change severity from "Minor" to "Major" for G-7150
PhilippSalvisberg Sep 8, 2023
c586263
change severity from "Minor" to "Major" for G-7210
PhilippSalvisberg Sep 8, 2023
ed69e3c
change severity from "Minor" to "Major" for G-7250
PhilippSalvisberg Sep 8, 2023
e39c37e
change severity from "Major" to "Blocker" for G-7330
PhilippSalvisberg Sep 8, 2023
71412cf
change severity from "Major" to "Blocker" for G-7450
PhilippSalvisberg Sep 8, 2023
0346b52
change severity from "Major" to "Critical" for G-7740
PhilippSalvisberg Sep 8, 2023
940fd8b
change severity from "Major" to "Critical" for G-7810
PhilippSalvisberg Sep 8, 2023
88f9e8d
change severity from "Critical" to "Blocker" for G-7910
PhilippSalvisberg Sep 8, 2023
12c118a
change severity from "Major" to "Critical" for G-8110
PhilippSalvisberg Sep 8, 2023
59e9c85
change severity from "Majro" to "Critical" for G-8120
PhilippSalvisberg Sep 8, 2023
f33aa54
change severity from "Major" to "Minor" for G-8210 and remove duplica…
PhilippSalvisberg Sep 8, 2023
fd1453b
change severity from "Minor" to "Major" for G-8310
PhilippSalvisberg Sep 8, 2023
cf107f2
change severity from "Minor" to "Blocker" for G-8410
PhilippSalvisberg Sep 8, 2023
3e30bfc
change severity from "Minor" to "Critical" for G-8510
PhilippSalvisberg Sep 8, 2023
1449d6b
change severity from "Major" to "Blocker" for G-9010
PhilippSalvisberg Sep 8, 2023
40d8435
change severity from "Minor" to "Major" for G-9030
PhilippSalvisberg Sep 8, 2023
06af7da
change severity from "Minor" to "Major" for G-9040
PhilippSalvisberg Sep 8, 2023
bc5a30d
update severities in appendix
PhilippSalvisberg Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/1-introduction/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/1-general/g-1030.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-1030: Avoid defining variables that are not used.

!!! tip "Minor"
!!! warning "Major"
Efficiency, Maintainability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/1-general/g-1040.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-1040: Avoid dead code.

!!! tip "Minor"
!!! warning "Major"
Maintainability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/1-general/g-1060.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-1060: Avoid storing ROWIDs or UROWIDs in database tables.

!!! warning "Major"
!!! danger "Critical"
Reliability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/1-general/g-1080.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-2145: Never self-assign a variable.

!!! tip "Minor"
!!! bug "Blocker"
Maintainability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-2185: Avoid using overly short names for explicitly or implicitly declared identifiers.

!!! tip "Minor"
!!! warning "Major"
Maintainability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-2190: Avoid using ROWID or UROWID.

!!! warning "Major"
!!! bug "Blocker"
Portability, Reliability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-2230: Try to use SIMPLE_INTEGER datatype when appropriate.

!!! tip "Minor"
!!! danger "Critical"
Efficiency

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# G-2320: Never use VARCHAR data type.

!!! warning "Major"
Portability
!!! bug "Blocker"
Portability, Reliability

## Reason

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# G-2330: Never use zero-length strings to substitute NULL.

!!! warning "Major"
Portability
!!! bug "Blocker"
Portability, Reliability

## Reason

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-2340: Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored).

!!! tip "Minor"
!!! bug "Blocker"
Reliability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3110.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3110: Always specify the target columns when coding an insert statement.

!!! warning "Major"
!!! bug "Blocker"
Maintainability, Reliability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3115.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3115: Avoid self-assigning a column.

!!! tip "Minor"
!!! bug "Blocker"
Maintainability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3130.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3130: Try to use ANSI SQL-92 join syntax.

!!! tip "Minor"
!!! warning "Major"
Maintainability, Portability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3145.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3145: Avoid using SELECT * directly from a table or view.

!!! warning "Major"
!!! danger "Critical"
Efficiency, Maintainability, Reliability, Testability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3150.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3150: Try to use identity columns for surrogate keys.

!!! tip "Minor"
!!! danger "Critical"
Maintainability, Reliability

## Restriction
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3185.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3185: Never use ROWNUM at the same query level as ORDER BY.

!!! warning "Major"
!!! bug "Blocker"
Reliability, Testability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3190.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3190: Avoid using NATURAL JOIN.

!!! warning "Major"
!!! bug "Blocker"
Changeability, Reliability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/3-dml-and-sql/1-general/g-3195.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3195: Always use wildcards in a LIKE clause.

!!! tip "Minor"
!!! bug "Blocker"
Maintainability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3220: Always process saved exceptions from a FORALL statement.

!!! warning "Major"
!!! danger "Critical"
Reliability, Testability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-3310: Never commit within a cursor loop.

!!! danger "Critical"
!!! bug "Blocker"
Efficiency, Reliability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-4130: Always close locally opened cursors.

!!! warning "Major"
!!! bug "Blocker"
Efficiency, Reliability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-4220: Try to use CASE rather than DECODE.

!!! tip "Minor"
!!! warning "Major"
Maintainability, Portability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-4340: Always use a NUMERIC FOR loop to process a dense array.

!!! tip "Minor"
!!! warning "Major"
Maintainability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-4360: Always use a WHILE loop to process a loose array.

!!! tip "Minor"
!!! danger "Critical"
Efficiency

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/5-exception-handling/g-5040.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/5-exception-handling/g-5050.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/5-exception-handling/g-5070.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-5070: Avoid using Oracle predefined exceptions.

!!! danger "Critical"
!!! bug "Blocker"
Reliability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/5-exception-handling/g-5080.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/7-stored-objects/1-general/g-7125.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-7125: Always use CREATE OR REPLACE instead of CREATE alone.

!!! tip "Minor"
!!! warning "Major"
Maintainability

## Reason
Expand Down
2 changes: 1 addition & 1 deletion docs/4-language-usage/7-stored-objects/1-general/g-7150.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-7150: Try to remove unused parameters.

!!! tip "Minor"
!!! warning "Major"
Efficiency, Maintainability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-7250: Never use RETURN in package initialization block.

!!! tip "Minor"
!!! warning "Major"
Maintainability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-7330: Always assign values to OUT parameters.

!!! tip "Major"
!!! bug "Blocker"
Maintainability, Testability

## Reason
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# G-7450: Never return a NULL value from a BOOLEAN function.

!!! warning "Major"
!!! bug "Blocker"
Reliability, Testability

## Reason
Expand Down
Loading