Skip to content

Commit

Permalink
clojure 1.12 alpha 12
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Corfield <[email protected]>
  • Loading branch information
seancorfield committed May 24, 2024
1 parent e40ace1 commit 05af681
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .clj-kondo/imports/com.github.seancorfield/expectations/config.edn
Original file line number Diff line number Diff line change
@@ -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/=}}
Original file line number Diff line number Diff line change
@@ -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}))
2 changes: 1 addition & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}}
Expand Down

0 comments on commit 05af681

Please sign in to comment.