0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-10 05:51:33 -05:00

📎 Add specific linter for service defmethod (on backend).

This commit is contained in:
Andrey Antukh 2021-06-18 10:53:03 +02:00 committed by Andrés Moya
parent c937ccc92b
commit 358fa7b20f
2 changed files with 26 additions and 7 deletions

View file

@ -6,9 +6,12 @@
app.db/with-atomic clojure.core/with-open}
:hooks
{:analyze-call {app.common.data/export hooks.export/export
potok.core/reify hooks.export/potok-reify
cljs.core/specify! hooks.export/clojure-specify}}
{:analyze-call
{app.common.data/export hooks.export/export
potok.core/reify hooks.export/potok-reify
cljs.core/specify! hooks.export/clojure-specify
app.util.services/defmethod hooks.export/service-defmethod
}}
:output
{:exclude-files
@ -41,8 +44,5 @@
{:exclude-destructured-as true
:exclude-destructured-keys-in-fn-args false
}
:unresolved-symbol
{:exclude ['(app.util.services/defmethod)
]}}}
}}

View file

@ -28,3 +28,22 @@
(api/token-node (gensym (:string-value rtype)))]
other))]
{:node result}))
(defn service-defmethod
[{:keys [:node]}]
(let [[rnode rtype & other] (:children node)
rsym (gensym (name (:k rtype)))
result (api/list-node
[(api/token-node (symbol "do"))
(api/list-node
[(api/token-node (symbol "declare"))
(api/token-node rsym)])
(api/list-node
(into [(api/token-node (symbol "defmethod"))
(api/token-node rsym)
rtype]
other))])]
{:node result}))