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

fix: add safe suppress to sqlformat error #1141

Merged
merged 1 commit into from
Feb 2, 2023
Merged

Conversation

czgu
Copy link
Collaborator

@czgu czgu commented Feb 1, 2023

user reported sql-formatter is throwing errors when formatting statements with BETWEEN. See sql-formatter-org/sql-formatter#534 for details

In this PR, I added try/catch when calling format to make it safer. Also refactored the code to break it down into smaller functions

@czgu czgu marked this pull request as ready for review February 1, 2023 22:48
@czgu czgu requested a review from jczhong84 February 1, 2023 22:50
@czgu czgu merged commit 0b85af3 into pinterest:master Feb 2, 2023
@czgu czgu deleted the fixformat branch February 2, 2023 00:02
rohan-sh1 pushed a commit to CAI-TECHNOLOGIES/cai-ext-db-explorer that referenced this pull request Apr 11, 2023
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
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.

2 participants