PabloRMira / sql_formatter

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

line comments with -- cancel further formatting #151

Closed PabloRMira closed 3 years ago

PabloRMira commented 3 years ago

Describe the bug

Line comments with -- instead of / / cancel further formatting

To Reproduce

After applying sql-formatter on the following query

select asdf,
-- some comment
qwer,
qwer2
from table1

we obtain

SELECT asdf
       -- some comment
qwer,
qwer2
from   table1;

Expected behavior

SELECT asdf
       -- some comment
       qwer,
       qwer2
FROM   table1;