From 05af68189323bfd6793a65f2eaa91f0006d2e506 Mon Sep 17 00:00:00 2001 From: Sean Corfield Date: Thu, 23 May 2024 19:30:19 -0700 Subject: [PATCH] clojure 1.12 alpha 12 Signed-off-by: Sean Corfield --- .../expectations/config.edn | 10 +++++++ .../seancorfield/expectations.clj_kondo | 29 +++++++++++++++++++ deps.edn | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .clj-kondo/imports/com.github.seancorfield/expectations/config.edn create mode 100644 .clj-kondo/imports/com.github.seancorfield/expectations/hooks/com/github/seancorfield/expectations.clj_kondo diff --git a/.clj-kondo/imports/com.github.seancorfield/expectations/config.edn b/.clj-kondo/imports/com.github.seancorfield/expectations/config.edn new file mode 100644 index 0000000..d94f1be --- /dev/null +++ b/.clj-kondo/imports/com.github.seancorfield/expectations/config.edn @@ -0,0 +1,10 @@ +{:hooks + {:analyze-call + {expectations.clojure.test/more-> + hooks.com.github.seancorfield.expectations/more-> + expectations.clojure.test/more-of + hooks.com.github.seancorfield.expectations/more-of}} + :lint-as + {expectations.clojure.test/defexpect clojure.test/deftest + expectations.clojure.test/from-each clojure.core/for + expectations.clojure.test/=? clojure.core/=}} diff --git a/.clj-kondo/imports/com.github.seancorfield/expectations/hooks/com/github/seancorfield/expectations.clj_kondo b/.clj-kondo/imports/com.github.seancorfield/expectations/hooks/com/github/seancorfield/expectations.clj_kondo new file mode 100644 index 0000000..10a5fe5 --- /dev/null +++ b/.clj-kondo/imports/com.github.seancorfield/expectations/hooks/com/github/seancorfield/expectations.clj_kondo @@ -0,0 +1,29 @@ +(ns hooks.com.github.seancorfield.expectations + (:require [clj-kondo.hooks-api :as api])) + +(defn more-> [{:keys [node]}] + (let [tail (rest (:children node)) + rewritten + (api/list-node + (list* + (api/token-node 'cond->) + (api/token-node 'nil) + tail))] + {:node rewritten})) + +(defn more-of [{:keys [node]}] + (let [bindings (fnext (:children node)) + pairs (partition 2 (nnext (:children node))) + rewritten + (api/list-node + (list* + (api/token-node 'fn) + (api/vector-node (vector bindings)) + (map (fn [[e a]] + (api/list-node + (list + (api/token-node 'expectations.clojure.test/expect) + e + a))) + pairs)))] + {:node rewritten})) diff --git a/deps.edn b/deps.edn index 94bdaf5..8c38e18 100755 --- a/deps.edn +++ b/deps.edn @@ -11,7 +11,7 @@ :1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}} :1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.3"}}} :1.11 {:override-deps {org.clojure/clojure {:mvn/version "1.11.3"}}} - :1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0-alpha11"}}} + :1.12 {:override-deps {org.clojure/clojure {:mvn/version "1.12.0-alpha12"}}} :kondo ; for debugging hooks {:extra-deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}}