Semicolons should not be put on the next line #278
Unanswered
nfcampos
asked this question in
The sqlfmt Style
Replies: 2 comments 1 reply
-
This is an intentional part of the style today. I like the visual separator when there are multiple queries in one file: select *
from revenue
;
select *
from costs
; (Unlike a language like javascript where a semicolon terminates each statement, here it terminates the whole query, so I feel that it should be at least as prominent as the main keywords in that query.) What are the arguments for merging it with the last line? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I see. Fair enough. I think this discussion might make more sense once you
support DDL, as there multiple statements per file will be the norm rather
than the exception.
For what it’s worth empty lines are usually good visual separation for me.
You could even enforce it by always adding eg. Two new lines after a
semicolon?
…On Mon, Oct 10 2022 at 7:49 pm, Ted Conbeer ***@***.***> wrote:
This is an intentional part of the style today. I like the visual
separator when there are multiple queries in one file:
select *from revenue
;
select *from costs
;
(Unlike a language like javascript where a semicolon terminates each
statement, here it terminates the whole query, so I feel that it should be
at least as prominent as the main keywords in that query.)
What are the arguments for merging it with the last line?
—
Reply to this email directly, view it on GitHub
<#278 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAN4RTHO5WIVHO72KNZPHTWCRQKJANCNFSM6AAAAAARBS6HS4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
Semicolons should not be put on the next line
To Reproduce
Expected behavior
Actual behavior
Additional context
What is the output of
sqlfmt --version
?Beta Was this translation helpful? Give feedback.
All reactions