yu-iskw / action-sqlfluff

Run sqlfluff with reviewdog to check or format styles
https://github.com/marketplace/actions/run-sqlfluff-with-reviewdog
MIT License
69 stars 27 forks source link

Enhancement: enable --show-lint-violations for sqlfluff fix #58

Open yaozhang09 opened 1 year ago

yaozhang09 commented 1 year ago

Currently: unfixable violations when running sqlfluff fix causes failed check with the error [n unfixable linting violations found]

Screenshot 2023-01-23 at 4 11 17 PM

Enhancement: be able to see what rules failed in the output with the sqlfluff flag --show-lint-violations so that the dev can go into the code and manually fix. In general have an option to pass additional options/flags to the action when running fix or lint

here is sqlfluff feature: https://github.com/sqlfluff/sqlfluff/pull/3788

yu-iskw commented 1 year ago

That sounds good. But I think supporting the feature requires a lot of efforts, because --show-lint-violatinos doesn't output as JSON or any other format to easily parse. Parsing the current format would be a bit hassle. If sqlfluff enables us to show lint violations as JSON in the future, I will consider we support the feature.

https://github.com/sqlfluff/sqlfluff/pull/3788#issuecomment-1462110429