clj-commons / kibit

There's a function for that!
1.76k stars 135 forks source link

Boot Support #197

Open DonyorM opened 7 years ago

DonyorM commented 7 years ago

What is the status of kibit's support for boot? I haven't seen a plugin that is equivalent to lein-kibit, is one necessary?

I'm creating a luminus template that uses boot, so I haven't used kibit with boot myself, hence the somewhat elementary questions.

danielcompton commented 7 years ago

It’s certainly possible, and I’d be happy to take a patch for it. Boot users can just call kibit with the src and test paths at the CLI with lein, but it would certainly be nicer to have native integration.

seancorfield commented 7 years ago

I just added a Kibit task to our Boot file:

(deftask kibit
  "Kibit checks code for idiomatic usage and makes suggestions."
  []
  (with-pass-thru fs
    (pod/with-eval-in (pod/make-pod (update-in (get-env)
                                               [:dependencies]
                                               conj
                                               '[lein-kibit "0.1.6-beta1"]))
      (require '[kibit.driver :refer [run]]
               '[clojure.java.io :as io])
      (run (for [folder ["src" "test"]
                 :let [file-path (io/file folder)]
                 :when (.exists file-path)]
             file-path)
           nil))))

It could be made a lot smarter than that but...