DeLaGuardo / clojure-lint-action

MIT License
42 stars 16 forks source link

fix: surface non-zero exit code for warnings #12

Closed alexdao3 closed 3 years ago

alexdao3 commented 3 years ago

Currently if clj-kondo detects warnings, it returns an exit code of 2; however, the clojure-lint-action script swallows the 2 and exits with 0. In this situation, it would be great to return a non-zero exit code upstream so that the GH action reports a failure.

If consumers of the GH action only want the check to fail on errors, they can provide the --fail-level error arg:

clj-kondo --lint src --fail-level error

Per https://github.com/clj-kondo/clj-kondo/blob/master/README.md#exit-codes, this returns

khmelevskii commented 3 years ago

Please merge this PR!

DeLaGuardo commented 3 years ago

Thanks for the PR!