yu-iskw / action-sqlfluff

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

SQLfluff lint fails, but workflow passed #39

Open XiChu2333 opened 2 years ago

XiChu2333 commented 2 years ago

The exit code is wrong for running SQLFluff lint: it return 0 even if the SQLFluff lint raises an exception.

It's because the sqlfluff_exit_code get the wrong code from "tee" command. https://github.com/yu-iskw/action-sqlfluff/blob/main/entrypoint.sh#:~:text=%24changed_files%20%7C-,tee%20%22%24lint_results%22,-sqlfluff_exit_code%3D%24%3F I can give a PR for fixing this.