Fork me on GitHub
#clj-kondo
<
2020-04-28
>
Ian Fernandez11:04:48

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

Ian Fernandez11: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?

Ian Fernandez11:04:46

aw, changed to var and looks cool

Ian Fernandez11:04:02

another one that I can't find resemblance is

Ian Fernandez11:04:23

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

Ian Fernandez11:04:18

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

borkdude11:04:34

looks like clojure.core/let to me

Ian Fernandez11: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

Ian Fernandez11:04:39

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

borkdude11:04:54

can you try clojure.core/binding?

Ian Fernandez11:04:35

error: unresolved symbol fn1-mon

borkdude11:04:03

so where is fn1-mon coming from?

Ian Fernandez11: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

Ian Fernandez11: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

Ian Fernandez11:04:25

Yeah, I will try this 😃

Ian Fernandez12:04:15

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

Ian Fernandez12:04:59

It wasn't me that made the macro =(

borkdude12:04:29

cool 🙂 preventing the Lisp curse with clj-kondo