You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug sqlfmt adds whitespace at the end of empty comment lines. This is inconvenient especially because I have a pre-commit hook that removes whitespace errors.
To Reproduce
Run sqlfmt --diff foo.sql. Output below.
Expected behavior
The tool should output:
1 file passed formatting check.
Actual behavior
It currently outputs:
diff --git a/foo.sql b/foo.sql
index 60c8820694f9..8f350d458d59 100644
--- a/foo.sql
+++ b/foo.sql
@@ -1,7 +1,7 @@
-- Here is an important comment. It is a comment about a very important and
-- complicated piece of SQL. It is so complex that it is important that we
-- can have multiple paragraphs of comments about it.
---
+--
-- See, here is the very important next paragraph about my code. Any moment
-- now, you will see the complex query once I am done with this paragraph.
select 1
The whitespace is more visible in my terminal with git diff.
Additional context
sqlfmt, version 0.13.0
The text was updated successfully, but these errors were encountered:
I agree this is a bug. We are standardizing white space in comments, need to make that conditional on there being content! Should be quite straightforward. I'll squeeze this into v0.14 (next few weeks).
Describe the bug
sqlfmt
adds whitespace at the end of empty comment lines. This is inconvenient especially because I have a pre-commit hook that removes whitespace errors.To Reproduce
Run
sqlfmt --diff foo.sql
. Output below.Expected behavior
The tool should output:
Actual behavior
It currently outputs:
The whitespace is more visible in my terminal with git diff.
Additional context
The text was updated successfully, but these errors were encountered: