aredington/kibit-mode

Consider a non-zero exit status when advice was given

Closed this issue · 4 comments

It's great to use kibit for pre-commit hooks or on CI servers, it's useful to have a status code to automatically fail operations.

The main kibit mode already does this when errors are found, only the kibit-flymake main exits 0 regardless of errors or not. This is probably incorrect.

However I have to ask, are you using kibit-flymake in either revision control hooks or ci servers?

When I use lein kibit it does not give non-zero exit status code.

I'm using that in CI Servers now, with some horrible output parsing to detect if something was output.

When you use lein kibit it does not execute code in this github repository. This is kibit-mode, the Emacs minor mode that runs kibit.

Jonas Enlund is the author of kibit, which is what you run doing lein kibit. The repository of that project is https://github.com/jonase/kibit. If you're using kibit in your CI environment, I suggest you have a discussion with Jonas there.

If your request is not granted, feel free to look over the code in this repository for how you can set up a quick lein task to run kibit and exit with a non-zero status code when there are errors. The relevant code is here: https://github.com/aredington/kibit-mode/blob/master/src/kibit_mode/core.clj#L182

Derp, sorry I didn't get the right repo. :)