mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
📎 Add specific linter for service defmethod (on backend).
This commit is contained in:
parent
c937ccc92b
commit
358fa7b20f
2 changed files with 26 additions and 7 deletions
|
@ -6,9 +6,12 @@
|
||||||
app.db/with-atomic clojure.core/with-open}
|
app.db/with-atomic clojure.core/with-open}
|
||||||
|
|
||||||
:hooks
|
:hooks
|
||||||
{:analyze-call {app.common.data/export hooks.export/export
|
{:analyze-call
|
||||||
|
{app.common.data/export hooks.export/export
|
||||||
potok.core/reify hooks.export/potok-reify
|
potok.core/reify hooks.export/potok-reify
|
||||||
cljs.core/specify! hooks.export/clojure-specify}}
|
cljs.core/specify! hooks.export/clojure-specify
|
||||||
|
app.util.services/defmethod hooks.export/service-defmethod
|
||||||
|
}}
|
||||||
|
|
||||||
:output
|
:output
|
||||||
{:exclude-files
|
{:exclude-files
|
||||||
|
@ -41,8 +44,5 @@
|
||||||
{:exclude-destructured-as true
|
{:exclude-destructured-as true
|
||||||
:exclude-destructured-keys-in-fn-args false
|
:exclude-destructured-keys-in-fn-args false
|
||||||
}
|
}
|
||||||
|
}}
|
||||||
:unresolved-symbol
|
|
||||||
{:exclude ['(app.util.services/defmethod)
|
|
||||||
]}}}
|
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,22 @@
|
||||||
(api/token-node (gensym (:string-value rtype)))]
|
(api/token-node (gensym (:string-value rtype)))]
|
||||||
other))]
|
other))]
|
||||||
{:node result}))
|
{: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}))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue