PabloRMira / sql_formatter

A Python based SQL formatter
https://pablormira.github.io/sql_formatter/
Apache License 2.0
43 stars 10 forks source link

Whole line comments should be aligned with the line under them #137

Closed PabloRMira closed 3 years ago

PabloRMira commented 3 years ago

Describe the bug

Something like

select case when asdf = 1 then 1
 else 0 end as qwer,
/* some comment */
qwerty
from table1

gets formatted as

SELECT case when asdf = 1 then 1
            else 0 end as qwer,
           /* some comment */
       qwerty
FROM   table1

and not like I would expect

SELECT case when asdf = 1 then 1
            else 0 end as qwer,
        /* some comment */
       qwerty
FROM   table1