Repository navigation
fix(format): lay out CTE macros with comments between them - #46
Merged
Merged
Conversation
A comment between two CTE macro placeholders stays in the SQL laid out without them, so the placeholders after it are now put back after it as a group of their own. Before, the whole run went back before the comment, the token check failed, and the query was declined with "native formatter could not restore CTE macro placeholders".
Deploying sqlclean with
|
| Latest commit: |
916acb1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://77dd9723.sqlclean.pages.dev |
| Branch Preview URL: | https://fix-cte-macro-comments.sqlclean.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
SQLBuild formats models whose CTE list mixes macro calls and comments, such as:
SQLClean 0.6.1 declines it with "native formatter could not restore CTE macro placeholders". A comment before or after a run of placeholders works; a comment between two of them does not.
Changes
Verification
formattedfalse) and passes with it, including the fingerprint and idempotency checks.make verify: fensu 0 faults; cargo 40 + 8 passed; pytest 72 passed.