Support :source-paths for Leiningen 2 compatibility.
This commit is contained in:
parent
975e692374
commit
04c3572921
1 changed files with 6 additions and 5 deletions
|
@ -3,11 +3,12 @@
|
|||
[clojure.java.io :as io]
|
||||
[jonase.kibit.core :as kibit]))
|
||||
|
||||
(defn kibit [project]
|
||||
(let [namespaces (-> project
|
||||
:source-path
|
||||
io/file
|
||||
ns/find-namespaces-in-dir)]
|
||||
(defn kibit
|
||||
"Suggest idiomatic replacements for patterns of code."
|
||||
[project]
|
||||
(let [paths (or (:source-paths project) [(:source-path project)])
|
||||
namespaces (apply concat (for [path paths]
|
||||
(ns/find-namespaces-in-dir (io/file path))))]
|
||||
(doseq [ns-sym namespaces]
|
||||
(try
|
||||
(println "==" ns-sym "==")
|
||||
|
|
Loading…
Reference in a new issue