diff --git a/.clj-kondo/taoensso/encore/config.edn b/.clj-kondo/taoensso/encore/config.edn new file mode 100644 index 0000000..7b0ff3c --- /dev/null +++ b/.clj-kondo/taoensso/encore/config.edn @@ -0,0 +1 @@ +{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}} diff --git a/.clj-kondo/taoensso/encore/taoensso/encore.clj b/.clj-kondo/taoensso/encore/taoensso/encore.clj new file mode 100644 index 0000000..7f6d30a --- /dev/null +++ b/.clj-kondo/taoensso/encore/taoensso/encore.clj @@ -0,0 +1,16 @@ +(ns taoensso.encore + (:require + [clj-kondo.hooks-api :as hooks])) + +(defn defalias [{:keys [node]}] + (let [[sym-raw src-raw] (rest (:children node)) + src (if src-raw src-raw sym-raw) + sym (if src-raw + sym-raw + (symbol (name (hooks/sexpr src))))] + {:node (with-meta + (hooks/list-node + [(hooks/token-node 'def) + (hooks/token-node (hooks/sexpr sym)) + (hooks/token-node (hooks/sexpr src))]) + (meta src))}))