Skip to content

Commit 03abef9

Browse files
dynj: integrate with clj-kondo
1 parent 6e4960b commit 03abef9

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{:linters {:monad/empty {:level :error}}
2-
:hooks {:analyze-call {active.clojure.monad/monadic hooks.monad/monadic
2+
:hooks {:analyze-call {active.clojure.dynj/declare-dynj hooks.dynj/declare-dynj
3+
active.clojure.monad/monadic hooks.monad/monadic
34
active.clojure.cljs.record/define-record-type hooks.record/define-record-type
45
active.clojure.cljs.record/define-singleton-type hooks.record/define-singleton-type
56
active.clojure.sum-type/define-sum-type hooks.sum-type/define-sum-type
67
active.clojure.record/define-record-type hooks.record/define-record-type
7-
active.clojure.record/define-singleton-type hooks.record/define-singleton-type}}}
8+
active.clojure.record/define-singleton-type hooks.record/define-singleton-type}}
9+
:lint-as {active.clojure.dynj/binding clojure.core/binding
10+
active.clojure.dynj/defn-dynj clojure.core/defn}}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
(ns hooks.dynj
2+
(:require [clj-kondo.hooks-api :as api]))
3+
4+
(defn declare-dynj
5+
[{:keys [node]}]
6+
(let [[name second & more] (rest (:children node))
7+
new-node (api/list-node
8+
(list (api/token-node 'do)
9+
(api/list-node [(api/token-node 'declare) name])))]
10+
{:node new-node}))

0 commit comments

Comments
 (0)