Open bw-tech opened 3 years ago
CASE WHEN statements that are longer than 82 characters create new lines that are severely indented.
Have a CASE WHEN statement with the WHEN clause being 82 characters are longer.
Not having the new formatted lines being indented beyond the previous lines.
I think the issues is the reformat_too_long_line method in core.py. Looks like there could be issues with the out_list list.
reformat_too_long_line
core.py
out_list
Could you please provide a complete example to reproduce?
See https://github.com/PabloRMira/sql_formatter/issues/161 for an example
Then I could add it to the tests :-)
Describe the bug
CASE WHEN statements that are longer than 82 characters create new lines that are severely indented.
To Reproduce
Have a CASE WHEN statement with the WHEN clause being 82 characters are longer.
Expected behavior
Not having the new formatted lines being indented beyond the previous lines.
I think the issues is the
reformat_too_long_line
method incore.py
. Looks like there could be issues with theout_list
list.