Permalink
Browse files

Support :source-paths for Leiningen 2 compatibility.

  • Loading branch information...
1 parent 975e692 commit 04c35729216a9785434167b8e6682b0a4f30bd6d @technomancy technomancy committed Mar 4, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 src/leiningen/kibit.clj
View
@@ -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 "==")

0 comments on commit 04c3572

Please sign in to comment.