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

CLI option to check if a file is correctly formatted #790

Open
JakobMiksch opened this issue Oct 22, 2024 · 2 comments
Open

CLI option to check if a file is correctly formatted #790

JakobMiksch opened this issue Oct 22, 2024 · 2 comments
Labels

Comments

@JakobMiksch
Copy link

Describe the Feature

The CLI should indicate if the SQL needs formatting or not.

Why do you want this feature?

I have a CI pipeline that should check if all SQL files in my repo comply to the standard formatting. It would be great to have an option that enables the CLI tool to return an error code if the file is not correctly formatted.

Possible implementation:

  • add CLI flag --check
  • if file needs to be formatted return an exit code 1
  • if file is properly formatted return exit code 0
@nene
Copy link
Collaborator

nene commented Oct 22, 2024

Seems like a sensible feature to add.

Would you be interested in implementing it?

@JakobMiksch
Copy link
Author

I fear I do not have capacity for it. The feature is currently nice-to-have but not super high priority for my use case.
If I find time, I will notify you again. Thanks for your effort of creating this whole library.

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

No branches or pull requests

2 participants