-
-
Notifications
You must be signed in to change notification settings - Fork 31
feat(prettier-plugin-sql): add support for clickhouse sql formatting #496
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
base: master
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: db8b260 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
📝 WalkthroughWalkthroughAdds ClickHouse support by bumping Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (6)
🧰 Additional context used🧠 Learnings (2)📚 Learning: 2025-04-17T01:50:12.370ZApplied to files:
📚 Learning: 2025-06-26T03:32:37.551ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (6)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to f303244 in 56 seconds. Click for details.
- Reviewed
28lines of code in2files - Skipped
1files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/sql/package.json:55
- Draft comment:
Dependency update to sql-formatter@15.7.0 is correct and necessary for ClickHouse support. Ensure tests cover the new dialect. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. packages/sql/src/index.ts:202
- Draft comment:
Added ClickHouse dialect option in the language choices; this resolves #495. The addition is straightforward. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_cphq3ElQGbJM9X88
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
f303244 to
50843c9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.changeset/clickhouse-formatting.md:
- Line 5: The change adds ClickHouse support in packages/sql/src/index.ts but
lacks tests and documentation; add a ClickHouse test fixture under
packages/sql/test/fixtures/ following the naming and input/output pattern used
by existing dialect fixtures (e.g., postgresql, mysql) to exercise the
ClickHouse formatting option, and update the root README.md to include
ClickHouse in the supported dialects/languages list so the new option (the
ClickHouse dialect added in packages/sql/src/index.ts) is documented.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (3)
.changeset/clickhouse-formatting.mdpackages/sql/package.jsonpackages/sql/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (2)
- packages/sql/package.json
- packages/sql/src/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
.changeset/clickhouse-formatting.md (1)
1-2: LGTM! Changeset metadata is correct.The changeset properly declares a
minorversion bump forprettier-plugin-sql, which is appropriate for adding a new feature (ClickHouse dialect support) according to semantic versioning.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
50843c9 to
db8b260
Compare
|
|
Also updated the readme now and added a simple test fixture to check if clickhouse formatting is working with some specific clickhouse-only sql functions |
prettier-plugin-autocorrect
prettier-plugin-pkg
prettier-plugin-sh
prettier-plugin-sql
prettier-plugin-toml
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #496 +/- ##
=======================================
Coverage 86.69% 86.69%
=======================================
Files 10 10
Lines 203 203
Branches 57 57
=======================================
Hits 176 176
Misses 26 26
Partials 1 1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



This PR adds support for formatting ClickHouse SQL dialect based on the changes from @mattbasta in the sql-formatter repo (Thanks Matt!)
Closes #495
Important
Adds support for ClickHouse SQL dialect in Prettier SQL plugin by updating
sql-formatterand adding ClickHouse as a dialect option.index.tsby adding it to thelanguagechoices.sql-formatterdependency inpackage.jsonto^15.7.0to support ClickHouse.This description was created by
for f303244. You can customize this summary. It will automatically update as commits are pushed.
Summary by CodeRabbit
New Features
Documentation
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.