rules repository

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
LineColumnMessage
233l_note is unnecessarily initialised with NULL.

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.

ParameterDescriptionDefault Value
DisableAllQuickFixComma-separated ist of rules for which a quick fix should not be applied to all the problems in a file.Core G-3130

References