You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 30, 2024. It is now read-only.
create or replace package body my_package is
procedure password_check(in_password invarchar2) is
co_digitarray constant string(10char) :='0123456789';
co_lower_bound constant simple_integer :=1;
co_errno constant simple_integer :=-20501;
co_errmsg constant string(100char) :='Password must contain a digit.';
l_isdigit boolean := false;
l_len_pw pls_integer;
l_len_array pls_integer;
begin
l_len_pw := length(in_password);
l_len_array := length(co_digitarray);
<<check_digit>>
for i in co_lower_bound..l_len_array
loop
<<check_pw_char>>
for j in co_lower_bound..l_len_pw
loop
if substr(in_password, j, 1) = substr(co_digitarray, i, 1) then
l_isdigit := true;
goto check_other_things;
end if;
end loop check_pw_char;
end loop check_digit;
<<check_other_things>>null;
if not l_isdigit then
raise_application_error(co_errno, co_errmsg);
end if;
end password_check;
end my_package;
/
Formatter result:
create or replace package body my_package is
procedure password_check(in_password invarchar2) is
co_digitarray constant string(10char) :='0123456789';
co_lower_bound constant simple_integer :=1;
co_errno constant simple_integer :=-20501;
co_errmsg constant string(100char) :='Password must contain a digit.';
l_isdigit boolean := false;
l_len_pw pls_integer;
l_len_array pls_integer;
begin
l_len_pw := length(in_password);
l_len_array := length(co_digitarray);
<<check_digit>>
for i in co_lower_bound..l_len_array
loop
<<check_pw_char>>
for j in co_lower_bound..l_len_pw
loop
if substr(in_password, j, 1) = substr(co_digitarray, i, 1) then
l_isdigit := true;
goto check_other_things;
end if;
end loop check_pw_char;
end loop check_digit;
<<check_other_things>>null;
if not l_isdigit then
raise_application_error(co_errno, co_errmsg);
end if;
end password_check;
end my_package;
/
The line break after the label statement ist lost. <<check_other_things>>null;. Looks like this happens for certain statements such as null statement but not for other statements like for loops or PL/SQL blocks starting with begin. A block starting with declare has the same issue.
Input/expected result with default settings:
Formatter result:
The line break after the label statement ist lost.
<<check_other_things>>null;. Looks like this happens for certain statements such asnullstatement but not for other statements likeforloops or PL/SQL blocks starting withbegin. A block starting withdeclarehas the same issue.