Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty comment at end of file gets mis-formatted #1197

Open
1 task done
DavidS-ovm opened this issue Aug 3, 2023 · 0 comments
Open
1 task done

Empty comment at end of file gets mis-formatted #1197

DavidS-ovm opened this issue Aug 3, 2023 · 0 comments

Comments

@DavidS-ovm
Copy link

Describe the bug

Files with an empty comment at the end get mis-formatted.

To Reproduce
Steps to reproduce the behavior:

  1. Create a SQL file with the following contents:
    --foo
    --
    
  2. Format Document twice
  3. File contents will now be
    --foo
    - -
    
  4. Sadness

Expected behavior
The last comment is preserved without the additional space

Screenshots

2023-08-03_10MS+0200_519x194

Desktop (please complete the following information):

  • SQLTools Version: v0.28.0
  • VS Code Version: 1.80.2
  • OS: Debian
  • Driver:
    • PostgreSQL/Redshift
  • Database version: postgres:14.6-alpine

Additional context
Setting files.insertFinalNewline to true works around the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants