This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Newlines being inserted into strings #256
Labels
Comments
I can reproduce it with begin
dbms_output.put_line('</');
end;
/ Formatter result is begin
dbms_output.put_line('<
/');
end;
/ This is a bug. Thank you for reporting it. |
The problem is not related to the Arbori program in this repo. In fact, the problem can be reproduced with the standard SQL Developer Arbori program. The culprit code section at the end of the int index = -1;
while(true) {
index = ret.indexOf(";/", index + 1);
if (index < 0) {
this.inputPos = -1;
return ret;
}
if (ret.indexOf("*", index + 1) != index + 2) {
String var10000 = ret.substring(0, index);
ret = var10000 + ";\n/" + ret.substring(index + 2);
}
}
} The problem is also reproducible with the latest SQLcl 23.3: |
PhilippSalvisberg
added a commit
that referenced
this issue
Dec 9, 2023
Issue is caused by SQLDev 23.1, SQLcl 23.3. We cannot fix it in the Arbori code. Therefore the tests are disabled for the time being.
PhilippSalvisberg
added a commit
that referenced
this issue
Dec 9, 2023
…tring add test case to reproduce issue #256
Post in SQL Developer forum: https://forums.oracle.com/ords/apexds/post/sqldev-23-1-sqlcl-23-3-bug-formatter-breaks-code-when-strin-2775 |
Issue is not fixed in SQLcl 23.4.0 |
Issue is fixed in SQLcl 24.1.0 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
when formatting files, newline characters get inserted into hardcoded strings containing encoded characters which can affect code logic
E.G.
'</'
becomes'<
/'
The text was updated successfully, but these errors were encountered: