 (ns sally.checkers.core
   (:require (clojure [string :as s]
                      [test :refer [are with-test]])))
-
 
 (with-test
   (defn- sym-to-var-form [sym]

       'hey/there 'hey
       'some.cool.ns/func 'some.cool.ns))

(defmacro defcheckers [& checkers]
  (let [checker-namespaces (into '() (set (map ns-sym-from-sym checkers)))
        checker-vars (map sym-to-var-form checkers)]
    `(defn ~'load-checkers [& {:keys [~'reload] :or {~'reload true}}]
       (doseq [~'checker-ns '~checker-namespaces]
         (if ~'reload
           (require :reload ~'checker-ns)
           (require ~'checker-ns)))
       ~(vec checker-vars))))

(defcheckers
  sally.checkers.kibit)

  ([checkable checkers]
   (into {} (for [checker checkers]
              [checker (checker checkable)])))
  ([checkable] (check checkable checkers)))
