Copyright 2010-2019 by Trivadis AG
Sägereistrasse 29 CH-8152 Glattbrugg (Zurich) www.trivadis.com |
Philipp Salvisberg, Trivadis AG, CH-8152 Glattbrugg | |
valid thru | 9999-12-31 |
valid for versions less than | 3 |
max. files | unlimited |
max. lines | unlimited |
max. commands | unlimited |
max. bytes | unlimited |
limited to | personal use |
path | /usr/local/bin/tvdcc/sample/. |
filter | (sql|prc|fnc|pks|pkb|trg|vw|tps|tpb|tbp|plb|pls|rcv|spc|typ|aqt|aqp|ctx|dbl|tab|dim|snp|con|collt|seq|syn|grt|sp|spb|sps|pck)$ |
timeout | 10 |
complexity | 10 |
output | /usr/local/bin/tvdcc/sample/./tvdcc_report.html |
template | html.xsl |
excel | true |
html | true |
transonly | false |
cleanup | true |
check | |
skip | |
nosonar | true |
license | |
validator | com.trivadis.tvdcc.validators.TrivadisGuidelines3 |
genmodel | false |
Start of processing | 2019-12-11 08:04:28 |
End of processing | 2019-12-11 08:04:37 |
Processing time in seconds | 8.839 |
Number of files | 93 | |||||
Number of bytes | 183,172 | |||||
Number of lines (LOC) | 8,015 | |||||
Number of comment lines | 814 | |||||
Number of blank lines | 1,294 | |||||
Number of net lines | 5,907 | |||||
Number of commands | 211 | |||||
Number of statements (PL/SQL) | 1,426 | |||||
Max. cyclomatic complexity | 5 | ( < 11 | 11..50 | > 50 | ) | |
Max. Halstead volume | 575 | ( < 1001 | 1001..3000 | > 3000 | ) | |
Min. maintainability index (MI) | 83 | ( > 84 | 64..84 | < 64 | ) | |
Number of issues | 288 | |||||
Number of warnings | 288 | |||||
Number of errors | 0 |
# | % | Severity | Characteristics | Message |
---|---|---|---|---|
1 | 0.3% | Blocker | Portability, Reliability | |
1 | 0.3% | Blocker | Reliability, Testability | |
2 | 0.7% | Critical | Reliability | |
1 | 0.3% | Critical | Reliability | |
1 | 0.3% | Critical | Reliability | |
1 | 0.3% | Critical | Efficiency, Reliability | |
1 | 0.3% | Critical | Efficiency, Reliability | |
1 | 0.3% | Critical | Maintainability | |
40 | 13.9% | Major | Efficiency | |
8 | 2.8% | Major | Reliability | |
4 | 1.4% | Major | Maintainability | |
4 | 1.4% | Major | Maintainability | |
3 | 1.0% | Major | Maintainability | |
3 | 1.0% | Major | Changeability, Reliability | |
3 | 1.0% | Major | Reliability | |
3 | 1.0% | Major | Maintainability, Reliability, Testability | |
2 | 0.7% | Major | Portability | |
2 | 0.7% | Major | Maintainability, Reliability | |
2 | 0.7% | Major | Efficiency | |
2 | 0.7% | Major | Changeability, Maintainability | |
2 | 0.7% | Major | Maintainability, Testability | |
2 | 0.7% | Major | Maintainability, Testability | |
2 | 0.7% | Major | Efficiency | |
1 | 0.3% | Major | Reliability | |
1 | 0.3% | Major | Maintainability, Reliability | |
1 | 0.3% | Major | Reliability | |
1 | 0.3% | Major | Portability, Reliability | |
1 | 0.3% | Major | Reliability | |
1 | 0.3% | Major | Portability | |
1 | 0.3% | Major | Portability | |
1 | 0.3% | Major | Maintainability, Reliability | |
1 | 0.3% | Major | Changeability, Reliability | |
1 | 0.3% | Major | Efficiency | |
1 | 0.3% | Major | Efficiency, Reliability | |
1 | 0.3% | Major | Reliability | |
1 | 0.3% | Major | Maintainability, Testability | |
1 | 0.3% | Major | Maintainability, Testability | |
1 | 0.3% | Major | Reliability | |
1 | 0.3% | Major | Efficiency | |
1 | 0.3% | Major | Changeability, Maintainability | |
1 | 0.3% | Major | Reliability | |
1 | 0.3% | Major | Maintainability, Testability | |
1 | 0.3% | Major | Maintainability, Reliability | |
1 | 0.3% | Major | Efficiency, Maintainability | |
1 | 0.3% | Major | Maintainability, Testability | |
1 | 0.3% | Major | Maintainability | |
1 | 0.3% | Major | Reusability | |
1 | 0.3% | Major | Reliability, Testability | |
1 | 0.3% | Major | Security | |
1 | 0.3% | Major | Efficiency, Maintainability | |
1 | 0.3% | Major | Efficiency, Reliability | |
1 | 0.3% | Major | Changeability, Maintainability | |
70 | 24.3% | Minor | Maintainability, Reliability, Reusability, Testability | |
29 | 10.1% | Minor | Changeability | |
10 | 3.5% | Minor | Changeability | |
5 | 1.7% | Minor | Maintainability | |
5 | 1.7% | Minor | Maintainability | |
4 | 1.4% | Minor | Maintainability | |
3 | 1.0% | Minor | Maintainability | |
3 | 1.0% | Minor | Maintainability | |
3 | 1.0% | Minor | Maintainability | |
2 | 0.7% | Minor | Maintainability | |
2 | 0.7% | Minor | Efficiency, Maintainability | |
2 | 0.7% | Minor | Maintainability | |
2 | 0.7% | Minor | Maintainability | |
2 | 0.7% | Minor | Efficiency | |
2 | 0.7% | Minor | Efficiency | |
2 | 0.7% | Minor | Reliability | |
2 | 0.7% | Minor | Maintainability | |
2 | 0.7% | Minor | Maintainability | |
2 | 0.7% | Minor | Changeability | |
1 | 0.3% | Minor | Changeability | |
1 | 0.3% | Minor | Efficiency | |
1 | 0.3% | Minor | Maintainability | |
1 | 0.3% | Minor | Maintainability, Portability | |
1 | 0.3% | Minor | Maintainability, Reliability | |
1 | 0.3% | Minor | Maintainability | |
1 | 0.3% | Minor | Maintainability, Portability | |
1 | 0.3% | Minor | Maintainability | |
1 | 0.3% | Minor | Efficiency | |
1 | 0.3% | Minor | Changeability, Maintainability | |
1 | 0.3% | Minor | Maintainability | |
1 | 0.3% | Minor | Efficiency, Maintainability | |
1 | 0.3% | Minor | Efficiency, Maintainability | |
1 | 0.3% | Minor | Maintainability | |
1 | 0.3% | Minor | Maintainability | |
1 | 0.3% | Info | Maintainability |
File name | PL/SQL Unit | Line | # Lines | # Comment lines | # Blank lines | # Net lines | # Stmts | Cyclomatic complexity | Halstead volume | Maintainability index |
---|
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 21 | Major | G-7240: Avoid using an IN OUT parameter as IN or OUT only. | in_wait INTEGER |
2 | 11 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_first_name IN OUT employees.first_name%TYPE |
3 | 12 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_last_name IN OUT employees.last_name%TYPE |
4 | 13 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_email IN OUT employees.email%TYPE |
5 | 14 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_phone_number IN OUT employees.phone_number%TYPE |
6 | 15 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_hire_date IN OUT employees.hire_date%TYPE |
7 | 16 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_job_id IN OUT employees.job_id%TYPE |
8 | 17 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_salary IN OUT employees.salary%TYPE |
9 | 18 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_commission_pct IN OUT employees.commission_pct%TYPE |
10 | 19 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_manager_id IN OUT employees.manager_id%TYPE |
11 | 20 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | io_department_id IN OUT employees.department_id%TYPE |
12 | 21 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_wait INTEGER |
13 | 47 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_first_name OUT employees.first_name%TYPE |
14 | 48 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_last_name OUT employees.last_name%TYPE |
15 | 49 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_email OUT employees.email%TYPE |
16 | 50 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_phone_number OUT employees.phone_number%TYPE |
17 | 51 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_hire_date OUT employees.hire_date%TYPE |
18 | 52 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_job_id OUT employees.job_id%TYPE |
19 | 53 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_salary OUT employees.salary%TYPE |
20 | 54 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_commission_pct OUT employees.commission_pct%TYPE |
21 | 55 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_manager_id OUT employees.manager_id%TYPE |
22 | 56 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | OUT_department_id OUT employees.department_id%TYPE |
23 | 57 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_wait IN INTEGER |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 38 | Major | G-5040: Avoid use of WHEN OTHERS clause in an exception section without any other specific handlers. | WHEN OTHERS THEN -- log error lock_up.release_lock(in_lock_handle => l_handle); RAISE; |
2 | 89 | Major | G-5040: Avoid use of WHEN OTHERS clause in an exception section without any other specific handlers. | WHEN OTHERS THEN -- log error lock_up.release_lock(in_lock_handle => l_handle); RAISE; |
3 | 48 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION request_lock( in_lock_name IN VARCHAR2, in_release_on_commit IN BOOLEAN := FALSE) RETURN VARCHAR2 |
4 | 32 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | co_lock_name CONSTANT VARCHAR2(30 CHAR) := 'APPLICATION_LOCK'; |
5 | 52 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | l_lock_handle VARCHAR2(128 CHAR); |
6 | 82 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | l_handle VARCHAR2(128 CHAR); |
7 | 83 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | co_lock_name CONSTANT VARCHAR2(30 CHAR) := 'APPLICATION_LOCK'; |
8 | 17 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_lock_name IN VARCHAR2 |
9 | 23 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_lock_name IN VARCHAR2 |
10 | 49 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_lock_name IN VARCHAR2 |
11 | 50 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_release_on_commit IN BOOLEAN := FALSE |
12 | 71 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_lock_handle IN VARCHAR2 |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Minor | G-1040: Avoid dead code. | 2=3 |
2 | 19 | Minor | G-1040: Avoid dead code. | EXIT my_loop |
3 | 26 | Minor | G-1040: Avoid dead code. | 'x' = 'y' |
4 | 37 | Minor | G-1040: Avoid dead code. | 5=6 |
5 | 43 | Minor | G-1040: Avoid dead code. | RETURN |
6 | 11 | Minor | G-1050: Avoid using literals in your code. | 2 |
7 | 11 | Minor | G-1050: Avoid using literals in your code. | 3 |
8 | 26 | Minor | G-1050: Avoid using literals in your code. | 'x' |
9 | 26 | Minor | G-1050: Avoid using literals in your code. | 'y' |
10 | 37 | Minor | G-1050: Avoid using literals in your code. | 5 |
11 | 37 | Minor | G-1050: Avoid using literals in your code. | 6 |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 22 | Major | G-7130: Always use parameters or pull in definitions rather than referencing external variables in a local program unit. | r_emp |
2 | 24 | Major | G-7130: Always use parameters or pull in definitions rather than referencing external variables in a local program unit. | r_emp |
3 | 24 | Major | G-7130: Always use parameters or pull in definitions rather than referencing external variables in a local program unit. | r_emp |
4 | 19 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION commission RETURN NUMBER |
5 | 50 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION commission (in_salary IN employees.salary%TYPE, in_comm_pct IN employees.commission_pct%TYPE) RETURN NUMBER |
6 | 16 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
7 | 47 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
8 | 50 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_salary IN employees.salary%TYPE |
9 | 51 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_comm_pct IN employees.commission_pct%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 14 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION does_exist (in_department_id IN departments.department_id%TYPE) RETURN BOOLEAN |
2 | 48 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION does_exist (in_department_id IN departments.department_id%TYPE) RETURN BOOLEAN |
3 | 58 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION does_exist (in_department_id IN departments.department_id%TYPE) RETURN BOOLEAN |
4 | 14 | Minor | G-7220: Always use forward declaration for private functions and procedures. | does_exist |
5 | 14 | Minor | G-7220: Always use forward declaration for private functions and procedures. | does_exist |
6 | 14 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_department_id IN departments.department_id%TYPE |
7 | 32 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_department_id IN departments.department_id%TYPE |
8 | 51 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_department_id IN departments.department_id%TYPE |
9 | 58 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_department_id IN departments.department_id%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 18 | Major | G-7230: Avoid declaring global variables public. | co_min_increase |
2 | 19 | Major | G-7230: Avoid declaring global variables public. | co_max_increase |
3 | 20 | Major | G-7230: Avoid declaring global variables public. | g_salary_increase |
4 | 23 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION salary_increase RETURN types_up.sal_increase_type |
5 | 34 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION salary_increase RETURN types_up.sal_increase_type |
6 | 44 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION salary_increase RETURN types_up.sal_increase_type |
7 | 60 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION salary_increase RETURN types_up.sal_increase_type |
8 | 28 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_increase IN types_up.sal_increase_type |
9 | 53 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_increase IN types_up.sal_increase_type |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Major | G-7430: Try to use no more than one RETURN statement within a function. | RETURN TRUE |
2 | 14 | Major | G-7430: Try to use no more than one RETURN statement within a function. | RETURN FALSE |
3 | 8 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function (in_value IN PLS_INTEGER) RETURN BOOLEAN |
4 | 22 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function (in_value IN PLS_INTEGER) RETURN BOOLEAN |
5 | 39 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function (in_value IN PLS_INTEGER) RETURN BOOLEAN |
6 | 8 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_value IN PLS_INTEGER |
7 | 22 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_value IN PLS_INTEGER |
8 | 39 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_value IN PLS_INTEGER |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 8 | Major | G-3110: Always specify the target columns when coding an insert statement. | INSERT INTO departments VALUES (departments_seq.nextval, 'Support', 100, 10) |
2 | 10 | Minor | G-1050: Avoid using literals in your code. | 'Support' |
3 | 11 | Minor | G-1050: Avoid using literals in your code. | 100 |
4 | 12 | Minor | G-1050: Avoid using literals in your code. | 10 |
5 | 20 | Minor | G-1050: Avoid using literals in your code. | 'Support' |
6 | 21 | Minor | G-1050: Avoid using literals in your code. | 100 |
7 | 22 | Minor | G-1050: Avoid using literals in your code. | 10 |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 22 | Minor | G-6020: Try to use output bind arguments in the RETURNING INTO clause of dynamic DML statements rather than the USING clause. | EXECUTE IMMEDIATE co_sql_stmt USING in_increase_pct, in_employee_id, OUT out_new_salary |
2 | 12 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
3 | 13 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_increase_pct IN types_up.percentage |
4 | 14 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | out_new_salary OUT employees.salary%TYPE |
5 | 29 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
6 | 30 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_increase_pct IN types_up.percentage |
7 | 31 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | out_new_salary OUT employees.salary%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 18 | Major | G-7420: Always make the RETURN statement the last statement of your function. | RETURN l_ret |
2 | 8 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function (in_from IN PLS_INTEGER, in_to IN PLS_INTEGER) RETURN PLS_INTEGER |
3 | 27 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function (in_from IN PLS_INTEGER, in_to IN PLS_INTEGER) RETURN PLS_INTEGER |
4 | 8 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_from IN PLS_INTEGER |
5 | 9 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_to IN PLS_INTEGER |
6 | 27 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_from IN PLS_INTEGER |
7 | 28 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_to IN PLS_INTEGER |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Major | G-2510: Avoid using the LONG and LONG RAW data types. | l_long LONG; |
2 | 11 | Major | G-2510: Avoid using the LONG and LONG RAW data types. | l_raw LONG RAW; |
3 | 10 | Major | G-7230: Avoid declaring global variables public. | l_long |
4 | 11 | Major | G-7230: Avoid declaring global variables public. | l_raw |
5 | 17 | Major | G-7230: Avoid declaring global variables public. | l_long |
6 | 18 | Major | G-7230: Avoid declaring global variables public. | l_raw |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Major | G-3120: Always use table aliases when your SQL statement involves more than one source. | last_name |
2 | 10 | Major | G-3120: Always use table aliases when your SQL statement involves more than one source. | first_name |
3 | 11 | Major | G-3120: Always use table aliases when your SQL statement involves more than one source. | department_name |
4 | 38 | Major | G-3120: Always use table aliases when your SQL statement involves more than one source. | employee_id |
5 | 40 | Minor | G-1050: Avoid using literals in your code. | '%Manager%' |
6 | 48 | Minor | G-1050: Avoid using literals in your code. | '%Manager%' |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 38 | Major | G-4310: Never use GOTO statements in your code. | GOTO check_other_things |
2 | 75 | Major | G-4370: Avoid using EXIT to stop loop processing unless you are in a basic loop. | EXIT check_digit |
3 | 75 | Minor | G-4375: Always use EXIT WHEN instead of an IF statement to exit from a loop. | EXIT check_digit |
4 | 18 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_password IN VARCHAR2 |
5 | 55 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_password IN VARCHAR2 |
6 | 92 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_password IN VARCHAR2 |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION employee_by_id (in_employee_id IN employees.employee_id%TYPE) RETURN employees%rowtype |
2 | 32 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION employee_by_id (in_employee_id IN employees.employee_id%TYPE) RETURN employees%rowtype |
3 | 10 | Minor | G-7120: Always add the name of the program unit to its end keyword. | employee_api |
4 | 11 | Minor | G-7120: Always add the name of the program unit to its end keyword. | employee_by_id |
5 | 11 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
6 | 32 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 8 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION name_by_id (in_department_id IN departments.department_id%TYPE, in_manager_id IN departments.manager_id%TYPE) RETURN departments.department_name%TYPE |
2 | 31 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION name_by_id (in_department_id IN departments.department_id%TYPE) RETURN departments.department_name%TYPE |
3 | 9 | Minor | G-7150: Try to remove unused parameters. | in_manager_id IN departments.manager_id%TYPE |
4 | 8 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_department_id IN departments.department_id%TYPE |
5 | 9 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_manager_id IN departments.manager_id%TYPE |
6 | 31 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_department_id IN departments.department_id%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 17 | Minor | G-1020: Always have a matching loop or block label. | <<prepare_data>> |
2 | 22 | Minor | G-1020: Always have a matching loop or block label. | <<process_data>> |
3 | 28 | Minor | G-1020: Always have a matching loop or block label. | <<while_loop>> |
4 | 34 | Minor | G-1020: Always have a matching loop or block label. | <<basic_loop>> |
5 | 39 | Minor | G-1020: Always have a matching loop or block label. | <<for_loop>> |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION small_increase RETURN NUMBER |
2 | 23 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION small_increase RETURN NUMBER |
3 | 10 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | co_small_increase CONSTANT NUMBER := 0.1; |
4 | 21 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | co_small_increase CONSTANT NUMBER(5,1) := 0.1; |
5 | 10 | Minor | G-2210: Avoid declaring NUMBER variables or subtypes with no precision. | NUMBER |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 16 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION big_increase RETURN NUMBER |
2 | 27 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION big_increase RETURN PLS_INTEGER |
3 | 14 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | co_big_increase CONSTANT NUMBER(5,0) := 1; |
4 | 14 | Minor | G-2220: Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values. | NUMBER(5,0) |
5 | 14 | Minor | G-2230: Try to use SIMPLE_INTEGER datatype when appropriate. | NUMBER(5,0) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Major | G-2330: Never use zero-length strings to substitute NULL. | := '' |
2 | 11 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION null_string RETURN VARCHAR2 |
3 | 21 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION empty_string RETURN VARCHAR2 |
4 | 9 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | co_null_string CONSTANT VARCHAR2(1) := ''; |
5 | 9 | Minor | G-2340: Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored). | VARCHAR2(1) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 15 | Major | G-3180: Always specify column names instead of positional references in ORDER BY clauses. | 4 |
2 | 15 | Major | G-3180: Always specify column names instead of positional references in ORDER BY clauses. | 1 |
3 | 15 | Major | G-3180: Always specify column names instead of positional references in ORDER BY clauses. | 3 |
4 | 15 | Minor | G-1050: Avoid using literals in your code. | 4 |
5 | 15 | Minor | G-1050: Avoid using literals in your code. | 3 |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 20 | Major | G-4130: Always close locally opened cursors. | OPEN c_department_salary(p_dept_id => in_dept_id) |
2 | 12 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION department_salary (in_dept_id IN departments.department_id%TYPE) RETURN NUMBER |
3 | 31 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION department_salary (in_dept_id IN departments.department_id%TYPE) RETURN NUMBER |
4 | 12 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_dept_id IN departments.department_id%TYPE |
5 | 31 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_dept_id IN departments.department_id%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 32 | Major | G-4140: Avoid executing any statements between a SQL operation and the usage of an implicit cursor attribute. | SQL%ROWCOUNT |
2 | 18 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_dept_id IN departments.department_id%TYPE |
3 | 23 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
4 | 44 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_dept_id IN departments.department_id%TYPE |
5 | 49 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_employee_id IN employees.employee_id%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 14 | Minor | G-4320: Always label your loops. | WHILE (i <= co_max_value) LOOP i := i + co_increment; END LOOP |
2 | 19 | Minor | G-4320: Always label your loops. | LOOP EXIT; END LOOP |
3 | 23 | Minor | G-4320: Always label your loops. | FOR i IN co_min_value..co_max_value LOOP sys.dbms_output.put_line(i); END LOOP |
4 | 28 | Minor | G-4320: Always label your loops. | FOR r_employee IN (SELECT last_name FROM employees) LOOP sys.dbms_output.put_line(r_employee.last_name); END LOOP |
5 | 20 | Minor | G-4380: Try to label your EXIT WHEN statements. | EXIT |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 17 | Minor | G-1050: Avoid using literals in your code. | 'START' |
2 | 19 | Minor | G-1050: Avoid using literals in your code. | 'END' |
3 | 26 | Minor | G-1050: Avoid using literals in your code. | 'DEMO' |
4 | 28 | Minor | G-1050: Avoid using literals in your code. | 'START' |
5 | 30 | Minor | G-1050: Avoid using literals in your code. | 'END' |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 20 | Major | G-5060: Avoid unhandled exceptions | SELECT department_name INTO l_department_name FROM departments WHERE department_id = in_id |
2 | 16 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION name_by_id (in_id IN departments.department_id%TYPE) RETURN departments.department_name%TYPE |
3 | 32 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION name_by_id (in_id IN departments.department_id%TYPE) RETURN departments.department_name%TYPE |
4 | 16 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_id IN departments.department_id%TYPE |
5 | 32 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_id IN departments.department_id%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Major | G-7440: Never use OUT parameters to return values from a function. | out_date OUT DATE |
2 | 9 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function (out_date OUT DATE) RETURN BOOLEAN |
3 | 19 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function RETURN DATE |
4 | 9 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | out_date OUT DATE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION dept_by_name (in_dept_name IN departments.department_name%TYPE) RETURN departments%ROWTYPE |
2 | 31 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION dept_by_name (in_dept_name IN departments.department_name%TYPE) RETURN departments%ROWTYPE |
3 | 14 | Minor | G-1050: Avoid using literals in your code. | 20 |
4 | 10 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | in_dept_name IN departments.department_name%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 8 | Major | G-2180: Never use quoted identifiers. | "sal+comm" |
2 | 9 | Major | G-2180: Never use quoted identifiers. | "my constant" |
3 | 10 | Major | G-2180: Never use quoted identifiers. | "my exception" |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Minor | G-2185: Avoid using overly short names for explicitly or implicitly declared identifiers. | i INTEGER; |
2 | 11 | Minor | G-2185: Avoid using overly short names for explicitly or implicitly declared identifiers. | c CONSTANT INTEGER := 1; |
3 | 12 | Minor | G-2185: Avoid using overly short names for explicitly or implicitly declared identifiers. | e exception; |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 17 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | co_big_increase CONSTANT NUMBER(5,0) := 1; |
2 | 17 | Minor | G-2220: Try to use PLS_INTEGER instead of NUMBER for arithmetic operations with integer values. | NUMBER(5,0) |
3 | 17 | Minor | G-2230: Try to use SIMPLE_INTEGER datatype when appropriate. | NUMBER(5,0) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 21 | Minor | G-4110: Always use %NOTFOUND instead of NOT %FOUND to check whether a cursor returned data. | NOT c_employees%FOUND |
2 | 20 | Minor | G-4330: Always use a CURSOR FOR loop to process the complete cursor results unless you are using bulk operations. | FETCH c_employees INTO r_employee |
3 | 42 | Minor | G-4330: Always use a CURSOR FOR loop to process the complete cursor results unless you are using bulk operations. | FETCH c_employees INTO r_employee |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 20 | Major | G-4370: Avoid using EXIT to stop loop processing unless you are in a basic loop. | EXIT while_loop WHEN i > co_max_value |
2 | 32 | Major | G-4370: Avoid using EXIT to stop loop processing unless you are in a basic loop. | EXIT for_loop WHEN i = co_max_value |
3 | 41 | Major | G-4370: Avoid using EXIT to stop loop processing unless you are in a basic loop. | EXIT process_employees |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 18 | Major | G-5050: Avoid use of the RAISE_APPLICATION_ERROR built-in procedure with a hard-coded -20nnn error number or hard-coded message. | raise_application_error(-20501,'Invalid employee_id') |
2 | 18 | Minor | G-1050: Avoid using literals in your code. | 20501 |
3 | 18 | Minor | G-1050: Avoid using literals in your code. | 'Invalid employee_id' |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 19 | Major | G-7140: Always ensure that locally defined procedures or functions are referenced. | FUNCTION my_func RETURN NUMBER |
2 | 19 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_func RETURN NUMBER |
3 | 33 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_func RETURN NUMBER |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | CREATE OR REPLACE FUNCTION my_function RETURN VARCHAR2 IS BEGIN RETURN NULL; END my_function; / |
2 | 17 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function RETURN VARCHAR2 |
3 | 9 | Minor | G-7410: Avoid standalone functions – put your functions in packages. | my_function |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-7450: Never return a NULL value from a BOOLEAN function. | RETURN NULL |
2 | 9 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function RETURN BOOLEAN |
3 | 18 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION my_function RETURN BOOLEAN |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Major | G-4385: Never use a cursor for loop to check whether a cursor returns data. | FOR emp_rec IN (SELECT employee_id FROM employees ORDER BY employee_id) LOOP NULL; -- some processing END LOOP employees |
2 | 26 | Minor | G-1050: Avoid using literals in your code. | 'Init' |
3 | 32 | Minor | G-1050: Avoid using literals in your code. | 'Processing ' |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 17 | Minor | G-2140: Never initialize variables with NULL. | l_value PLS_INTEGER := NULL; |
2 | 9 | Info | G-0000: Avoid using the NOSONAR marker. | := NULL; -- NOSONAR |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 8 | Minor | G-1010: Try to label your sub blocks. | BEGIN NULL; END |
2 | 12 | Minor | G-1010: Try to label your sub blocks. | BEGIN NULL; END |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Minor | G-1030: Avoid defining variables that are not used. | l_first_name employees.first_name%TYPE; |
2 | 12 | Minor | G-1030: Avoid defining variables that are not used. | e_good EXCEPTION; |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 31 | Major | G-7230: Avoid declaring global variables public. | co_president |
2 | 18 | Minor | G-1050: Avoid using literals in your code. | 'AD_PRES' |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Minor | G-1070: Avoid nesting comment blocks. | /* comment one -- nested comment two */ |
2 | 11 | Minor | G-1070: Avoid nesting comment blocks. | -- comment three /* nested comment four */ |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 17 | Major | G-3140: Try to use anchored records as targets for your cursors. | INTO l_employee_id, l_first_name, l_last_name |
2 | 22 | Major | G-3140: Try to use anchored records as targets for your cursors. | INTO l_employee_id, l_first_name, l_last_name |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 28 | Minor | G-4380: Try to label your EXIT WHEN statements. | EXIT WHEN l_innerlp = co_exit_value |
2 | 31 | Minor | G-4380: Try to label your EXIT WHEN statements. | EXIT WHEN l_innerlp = co_exit_value |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 16 | Blocker | G-5030: Never assign predefined exception names to user defined exceptions. | no_data_found EXCEPTION; |
2 | 26 | Critical | G-5070: Avoid using Oracle predefined exceptions | RAISE no_data_found |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-6010: Always use a character variable to execute dynamic SQL. | EXECUTE IMMEDIATE 'select employees_seq.nextval from dual' INTO l_next_val |
2 | 11 | Minor | G-1050: Avoid using literals in your code. | 'select employees_seq.nextval from dual' |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 14 | Major | G-7110: Try to use named notation when calling program units. | r_employee |
2 | 14 | Major | G-7110: Try to use named notation when calling program units. | co_id |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-7710: Avoid cascading triggers. | departments_hist |
2 | 40 | Major | G-7710: Avoid cascading triggers. | departments_hist |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 14 | Major | G-8110: Never use SELECT COUNT(*) if you are only interested in the existence of a row. | count(*) |
2 | 18 | Major | G-8120: Never check existence of a row to decide whether to create it or not. | l_count = 0 THEN INSERT INTO departments VALUES in_r_department; |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 18 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | date_in IN DATE |
2 | 50 | Minor | G-8310: Always validate input parameter size by assigning the parameter to a size limited variable in the declaration section of program unit. | date_in IN DATE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 19 | Major | G-1060: Avoid storing ROWIDs or UROWIDs in database tables. | ROWID |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-2110: Try to use anchored declarations for variables, constants and types. | l_last_name VARCHAR2(20 CHAR); |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Minor | G-2120: Try to have a single location to define your types. | SUBTYPE big_string_type IS VARCHAR2(1000 CHAR); |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 19 | Minor | G-2130: Try to use subtypes for constructs used often in your code. | l_note VARCHAR2(1000 CHAR); |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 8 | Minor | G-2140: Never initialize variables with NULL. | l_note big_string := NULL; |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Blocker | G-2150: Avoid comparisons with NULL value, consider using IS [NOT] NULL. | l_value = NULL |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Critical | G-2160: Avoid initializing variables using functions in the declaration section. | l_department_name departments.department_name%TYPE := department_api.name_by_id(in_id => co_department_id); |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 17 | Major | G-2170: Never overload variables. | l_variable |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 18 | Major | G-2190: Avoid the use of ROWID or UROWID. | ROWID |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-2310: Avoid using CHAR data type. | CHAR(200) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-2320: Avoid using VARCHAR data type. | VARCHAR(200) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Minor | G-2340: Always define your VARCHAR2 variables using CHAR SEMANTIC (if not defined anchored). | VARCHAR2(200) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Minor | G-2410: Try to use boolean data type for values with dual meaning. (co_numeric_false, co_numeric_true). | l_bigger PLS_INTEGER; |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Minor | G-3130: Try to use ANSI SQL-92 join syntax. | employees e, departments d |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 23 | Minor | G-3150: Try to use identity columns for surrogate keys. | nextval |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 19 | Minor | G-1050: Avoid using literals in your code. | 107 |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Major | G-3190: Avoid using NATURAL JOIN. | NATURAL JOIN departments d |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 21 | Major | G-3210: Always use BULK OPERATIONS (BULK COLLECT, FORALL) whenever you have to execute a DML statement more than 4 times. | FOR i IN 1..t_employee_ids.COUNT() LOOP UPDATE employees SET salary = salary + (salary * co_increase) WHERE employee_id = t_employee_ids(i); END LOOP process_employees |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 26 | Critical | G-4120: Avoid using %NOTFOUND directly after the FETCH when working with BULK OPERATIONS and LIMIT clause. | c_employees%NOTFOUND |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 8 | Major | G-4210: Try to use CASE rather than an IF statement with multiple ELSIF paths. | IF l_color = constant_pkg.co_red THEN do_red; ELSIF l_color = constant_pkg.co_blue THEN do_blue; ELSIF l_color = constant_pkg.co_black THEN do_black; END IF |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Minor | G-4220: Try to use CASE rather than DECODE. | DECODE(dummy, a, x , b, y , c, z , 0) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Critical | G-4230: Always use COALESCE instead of NVL, if parameter 2 of the NVL function is a function call or a SELECT statement. | NVL(dummy, my_package.expensive_null(value_in => dummy)) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Critical | G-4240: Always use CASE instead of NVL2 if parameter 2 or 3 of NVL2 is either a function call or a SELECT statement. | NVL2(dummy, my_package.expensive_nn(value_in => dummy), my_package.expensive_null(value_in => dummy)) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 21 | Minor | G-4330: Always use a CURSOR FOR loop to process the complete cursor results unless you are using bulk operations. | FETCH c_employees INTO r_employee |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 27 | Minor | G-4340: Always use a NUMERIC FOR loop to process a dense array. | i > t_employees.COUNT() |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 19 | Major | G-4350: Always use 1 as lower and COUNT() as upper bound when looping through a dense array. | t_employees.FIRST()..t_employees.LAST() |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 27 | Minor | G-4360: Always use a WHILE loop to process a loose array. | 1 .. t_employees.COUNT() |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 16 | Minor | G-4375: Always use EXIT WHEN instead of an IF statement to exit from a loop. | EXIT process_employees |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 14 | Major | G-4385: Never use a cursor for loop to check whether a cursor returns data. | FOR r_employee IN c_employees LOOP l_employee_found := TRUE; END LOOP check_employees |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 23 | Major | G-4390: Avoid use of unreferenced FOR loop indexes. | FOR i IN co_lower_bound .. co_upper_bound LOOP sys.dbms_output.put_line(l_row || co_delimiter || l_value); l_row := l_row + co_row_incr; l_value := l_value + co_value_incr; END LOOP for_loop |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Minor | G-4395: Avoid hard-coded upper or lower bound values with FOR loops. | 1..5 |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 18 | Critical | G-5020: Never handle unnamed exceptions using the error number. | WHEN OTHERS THEN IF SQLCODE = co_no_data_found THEN NULL; END IF; |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 17 | Major | G-5040: Avoid use of WHEN OTHERS clause in an exception section without any other specific handlers. | WHEN OTHERS THEN my_package.some_further_processing(); |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 15 | Critical | G-5070: Avoid using Oracle predefined exceptions | RAISE NO_DATA_FOUND |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Minor | G-7210: Try to keep your packages small. Include only few procedures and functions that are used in the same context. | example_pkg |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 9 | Minor | G-7310: Avoid standalone procedures – put your procedures in packages. | my_procedure |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 20 | Major | G-7320: Avoid using RETURN statements in a PROCEDURE. | RETURN |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 10 | Major | G-7460: Try to define your packaged/standalone function to be deterministic if appropriate. | FUNCTION name_by_id (in_department_id IN departments.department_id%TYPE) RETURN departments.department_name%TYPE |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 12 | Major | G-7510: Always prefix ORACLE supplied packages with owner schema name. | dbms_output.put_line(co_hello_world) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 11 | Major | G-7810: Do not use SQL inside PL/SQL to read sequence numbers (or SYSDATE) | employees_seq.NEXTVAL |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 15 | Major | G-8110: Never use SELECT COUNT(*) if you are only interested in the existence of a row. | count(*) |
Issue# | Line | Severity | Message | Code Excerpt |
---|---|---|---|---|
1 | 19 | Major | G-8210: Always use synonyms when accessing objects of another application schema. | oe.products |