File tree Expand file tree Collapse file tree 3 files changed +25
-9
lines changed
.clj-kondo/taoensso/encore Expand file tree Collapse file tree 3 files changed +25
-9
lines changed Original file line number Diff line number Diff line change 11{:hooks
22 {:analyze-call
33 {taoensso.encore/defalias taoensso.encore/defalias
4- taoensso.encore/defn-cached taoensso.encore/defn-cached}}}
4+ taoensso.encore/defn-cached taoensso.encore/defn-cached
5+ taoensso.encore/defonce taoensso.encore/defonce}}}
Original file line number Diff line number Diff line change 22 " I don't personally use clj-kondo, so these hooks are
33 kindly authored and maintained by contributors.
44 PRs very welcome! - Peter Taoussanis"
5+ (:refer-clojure :exclude [defonce ])
56 (:require
67 [clj-kondo.hooks-api :as hooks]))
78
89(defn defalias
910 [{:keys [node]}]
1011 (let [[sym-raw src-raw] (rest (:children node))
11- src (if src-raw src-raw sym-raw)
12- sym
13- (if src-raw
14- sym-raw
15- (symbol (name (hooks/sexpr src))))]
16-
12+ src (or src-raw sym-raw)
13+ sym (if src-raw sym-raw (symbol (name (hooks/sexpr src))))]
1714 {:node
1815 (with-meta
1916 (hooks/list-node
2320 (meta src))}))
2421
2522(defn defn-cached
26- [{:keys [node] :as x }]
23+ [{:keys [node]}]
2724 (let [[sym _opts binding-vec & body] (rest (:children node))]
2825 {:node
2926 (hooks/list-node
3532 (hooks/token-node 'fn)
3633 binding-vec
3734 body))))}))
35+
36+ (defn defonce
37+ [{:keys [node]}]
38+ ; ; args = [sym doc-string? attr-map? init-expr]
39+ (let [[sym & args] (rest (:children node))
40+ [doc-string args] (if (and (hooks/string-node? (first args)) (next args)) [(hooks/sexpr (first args)) (next args)] [nil args])
41+ [attr-map init-expr] (if (and (hooks/map-node? (first args)) (next args)) [(hooks/sexpr (first args)) (fnext args)] [nil (first args)])
42+
43+ attr-map (if doc-string (assoc attr-map :doc doc-string) attr-map)
44+ sym+meta (if attr-map (with-meta sym attr-map) sym)
45+ rewritten
46+ (hooks/list-node
47+ [(hooks/token-node 'clojure.core/defonce)
48+ sym+meta
49+ init-expr])]
50+
51+ {:node rewritten}))
Original file line number Diff line number Diff line change 88 :username #or [#env DB_USER " postgres" ]
99 :password #or [#env DB_PASS " postgres" ]
1010 :host #or [#env DB_HOST " localhost" ]
11- :port #or [#env DB_PORT 5432 ]}
11+ :port #or [#env DB_PORT 5432 ]
12+ :useSSL true }
1213
1314 :db-docs {:dir #or [#env DB_DOCS_DIR " target" ]
1415 :url #or [#env DB_DOCS_URL " https://github.com/clj-codes/docs.extractor/releases/download" ]
You can’t perform that action at this time.
0 commit comments