action-sqlfluff icon indicating copy to clipboard operation
action-sqlfluff copied to clipboard

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

Open yaozhang09 opened this issue 2 years ago • 1 comments
trafficstars

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

yaozhang09 avatar Jan 24 '23 00:01 yaozhang09

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

yu-iskw avatar Mar 09 '23 13:03 yu-iskw