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

Optionaly give a return code of 1 for sqruff fix if anything is flagged #893

Open
concur1 opened this issue Oct 25, 2024 · 1 comment · May be fixed by #1057
Open

Optionaly give a return code of 1 for sqruff fix if anything is flagged #893

concur1 opened this issue Oct 25, 2024 · 1 comment · May be fixed by #1057
Labels
bug Something isn't working

Comments

@concur1
Copy link
Contributor

concur1 commented Oct 25, 2024

I appreciate you all are working hard on this. Thanks!

sqlfluff gives a return code of 1 when running fix and finding unfixable linting violations and a return code 0 when there are no unfixable linting violations. It would be great if sqruff could replicate this behavior.

this functionality would be really helpful to me as it would allow me to just use sqruff fix in a pre commit hook instaead of both sqruff fix and sqruff lint. This halves the run time which is useful for large files.

@benfdking
Copy link
Collaborator

That's a good shout! I do think it should return 1 if it can't fix everything and tell you.

@benfdking benfdking added the bug Something isn't working label Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants