Browse files

Cleanup hook code

When transitioning to hooking into leiningen instead of pomegranate
I left a conversion of args to a hashmap, along with a function that
ignored its arguments.  This removes and cleans those up.

Fixes #8.
  • Loading branch information...
1 parent ce79a2b commit 311b730d5605643b91d7209dd97e2e2983229bc8 @xeqi committed Oct 8, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/lein_pedantic/plugin.clj
@@ -57,15 +57,13 @@
;We're hooking a private method and pulling its arguments.
;This will probably break sometime in the future.
(defn pedantic-deps [get-dependencies dependency-key project & args]
- (let [args (apply hash-map args)
- deps (get project dependency-key)
- add-deps (fn [x] (apply get-dependencies dependency-key project args))
+ (let [deps (get project dependency-key)
resolve-deps (fn [x]
(get-dependencies dependency-key (assoc project dependency-key x)))
map-to-deps (fn [coords] (into {}
(map #(vector % (resolve-deps [%]))
- result (add-deps deps)
+ result (apply get-dependencies dependency-key project args)
overrulled (pedantic/determine-overrulled result
(map-to-deps deps))]
(if (empty? overrulled)

0 comments on commit 311b730

Please sign in to comment.