📎 clj-kondo hooks for benchmark macros

This commit is contained in:
Miguel de Benito Delgado 2026-10-02 20:01:25 +02:00
parent 693b0f5706
commit bfc3abf10c
2 changed files with 16 additions and 0 deletions

View File

@ -24,6 +24,8 @@
shadow.lazy/loadable hooks.export/rumext-lazycomponent
app.util.i18n/tr hooks.i18n/tr-dynamic
app.common.i18n/tr hooks.i18n/tr-dynamic
benches.render-wasm.declarations/defscene hooks.export/benches-defscene
benches.render-wasm.declarations/defcase hooks.export/benches-defcase
}}
:output

View File

@ -10,6 +10,20 @@
sname])]
{:node result}))
(defn benches-defscene
[{:keys [node]}]
(let [[_ _ opts argv & body] (:children node)]
(if (and argv (api/vector-node? argv))
{:node (api/list-node (into [(api/token-node (quote fn)) argv] body))}
{:node node})))
(defn benches-defcase
[{:keys [node]}]
(let [[_ _ opts argv & body] (:children node)]
(if (and (seq body) argv (api/vector-node? argv))
{:node (api/list-node (into [(api/token-node (quote fn)) argv] body))}
{:node node})))
(def registry (atom {}))