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

Camyllh clickhouse linter #6187

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Camyllh clickhouse linter #6187

wants to merge 8 commits into from

Conversation

Camyll
Copy link

@Camyll Camyll commented Jan 17, 2025

still in test - creating PR for debugging

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
torchci ⬜️ Ignored (Inspect) Visit Preview Jan 18, 2025 1:27am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 17, 2025
)

#trying this here since having issues with init_command'
run_command(
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue is here. I know this command should be in the toml file in init_command but I'm getting various errors when I try and run it in there

@Camyll Camyll force-pushed the camyllh_clickhouse_linter branch from 21d1241 to 1283197 Compare January 18, 2025 00:21
)
]

replacement = proc.stdout
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this should be proc.stdout.decode("utf-8") I think as it is used to compare with the original string in the next line

original = f.read()

try:
proc = run_command(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command removes the comments from the query. Let me check https://github.com/ClickHouse/ClickHouse for more details. The doc says there is --comments to keep the comments but it doesn't seem to work for me https://clickhouse.com/docs/en/operations/utilities/clickhouse-format

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants