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

Sqlfluff fix for a files listed in sqlfluff lint --write-output #5971

Open
2 of 3 tasks
lokofoko opened this issue Jun 19, 2024 · 0 comments
Open
2 of 3 tasks

Sqlfluff fix for a files listed in sqlfluff lint --write-output #5971

lokofoko opened this issue Jun 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@lokofoko
Copy link

Search before asking

  • I searched the issues and found no similar issues.

Description

Hi. I found that it will be useful for some automatization.
Since we can already write to a file using sqlfluff lint, we can use it with a diff-quality tool. I want to be able to run sqlfluff fix for only changed files.

Right now it is not possible/I didn't find anything useful except just looping through the file parsing it and running sqlfluff fix for each file there.

Use case

I want to be able to point to a file generated by sqlfluff lint when I run sqlfluff fix to fix only a specific set of files.
In the current example, together with diff-quality that gives me linting for only changed files.

Dialect

I don't think this is a dialect thing, but I am using the snowflake dialect.

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

@lokofoko lokofoko added the enhancement New feature or request label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant