G-2140
🆓Warning
Never initialize variables with NULL.
Reason
By default, variables are initialised with null. Therefore, an explicit assignment is unnecessary.
Example
Non-Compliant Example
declare l_note varchar2(100 char) := null; begin sys.dbms_output.put_line(l_note); end; /
Issues
| Line | Column | Message |
|---|---|---|
| 2 | 33 |
Compliant Solution - ★★★★★
declare l_note varchar2(100 char); begin sys.dbms_output.put_line(l_note); end; /
Parameters
Use parameters to customize the rule to your needs.
| Parameter | Description | Default Value |
|---|---|---|
| DisableAllQuickFix | Comma-separated list of rules for which a quick fix should not be applied to all the problems in a file. | Core G-3130 |
References
- same as plsql:InitializeWithNullCheck
- same as Trivadis G-2140