Fork me on GitHub
#clj-kondo
<
2020-04-28
>
d.ian.b11:04:48

Hello, how can I search a function signature that resembles my macro signature?

d.ian.b11:04:55

I've tried to lint a macro like clojure.core/def and I got warning: inline def

borkdude11:04:22

@d.ian.b What does your macro look like when called?

d.ian.b11:04:46

aw, changed to var and looks cool

d.ian.b11:04:02

another one that I can't find resemblance is

d.ian.b11:04:23

(defmacro spy-on [fun-monitor-pair & body] ,,,,

d.ian.b11:04:18

(helpers/spy-on [fn1 fn1-mon fn2 fn2-mon] (body) )

borkdude11:04:34

looks like clojure.core/let to me

d.ian.b11:04:04

: error: unsupported binding form a-namespace/fn1

borkdude11:04:24

it seems you have not given me the example like you are calling it

d.ian.b11:04:39

for (helpers/spy-on [a-namespace/fn1 fn1-mon] (body) )

borkdude11:04:54

can you try clojure.core/binding?

d.ian.b11:04:35

error: unresolved symbol fn1-mon

borkdude11:04:03

so where is fn1-mon coming from?

d.ian.b11:04:20

is a name that i'm giving

borkdude11:04:53

so you have the name on the right instead of most macros which have the name on the right. that makes it incompatible

d.ian.b11:04:56

it's like inside a macro, i'm creating an atom named of this

borkdude11:04:43

maybe you could try changing your macro. and else: {:linters {:unresolved-symbol {:exclude [(foo.helpers/spy-on)]}}}

borkdude11:04:04

I think in your code binding should work, if you reverse names to the left

d.ian.b11:04:25

Yeah, I will try this 😃

d.ian.b12:04:15

fixed the order of macro call, clojure.core/let did the job

d.ian.b12:04:23

thanks @borkdude

d.ian.b12:04:59

It wasn't me that made the macro =(

borkdude12:04:29

cool 🙂 preventing the Lisp curse with clj-kondo