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

Fixing bug in sql formatter where values provided after reserved 'VALUES' keyword were not being indented properly #786

Merged

Conversation

jlevier
Copy link

@jlevier jlevier commented Apr 4, 2023

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • New feature or enhancement
  • UI change (please include screenshot!)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Internationalization and localization
  • Other (please describe):

What is the current behavior?

Issue Number: #773

What is the new behavior?

  • The reserved keyword of "VALUES" will also be considered when omitting trimming of the end of new line spacing while formatting SQL. The current implementation includes LineComment, Operator, and OpenParen.

Other information

image

Quality check

Before creating this PR:

  • Did you follow the code style guideline as described in CONTRIBUTING.md
  • Did you build the app and test your changes?
  • Did you check for accessibility? On Windows, you can use Accessibility Insights for this.
  • Did you verify that the change work in Release build configuration
  • Did you verify that all unit tests pass
  • If necessary and if possible, did you verify your changes on:
    • Windows
    • macOS (DevToys 2.0)
    • Linux (DevToys 2.0)

…UES' keyword were not being indented properly
@veler
Copy link
Collaborator

veler commented Apr 4, 2023

Thank you very much for this fix! I will merge it in main branch (DevToys 1.0). Your fix will be ported to DevToys 2.0 when we get to it.

@veler veler merged commit cd45dd4 into DevToys-app:main Apr 4, 2023
1 check passed
@veler veler linked an issue Apr 4, 2023 that may be closed by this pull request
@jlevier
Copy link
Author

jlevier commented Apr 4, 2023

Thank you so much for the quick review!

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

Successfully merging this pull request may close these issues.

SQL formatter - select from values puts first value with no indentation
2 participants