Fork me on GitHub
#clj-kondo
<
2023-11-08
>
jpmonettas16:11:34

hi eveybody! I'm working on a project which is full of macros so seeing lots of errors when running clj-kondo. I'm currently trying to ignore them with :

:config-in-call {app/the-macro {:linters {:unresolved-symbol {:level :off}}}
                ...}
etc. So a couple of questions : Is there a way of muting all linters for a specific macro? And is there a way of logging the linter error/warning keyword next to each error so I can know what to mute?

borkdude16:11:03

yes: :config-in-call {app/the-macro {:ignore true}}

Noah Bogart16:11:31

i can help you write a hook if you would like that instead

jpmonettas16:11:43

thanks @UEENNMX0T, I think for now ignoring them will be enough, but in the future I should probably do that

👍 1
Noah Bogart16:11:30

has anyone explored auto-generating hooks from macro definitions? i wonder if it would be possible for "simple" macros to convert the syntax-quoted output into the relevant api/X-node forms

borkdude17:11:01

You don’t even need to use the node stuff if you use the macroexpand hooks

Noah Bogart17:11:55

right, but that requires duplicating the macro in the hook. i'm wondering if it would be possible to analyze the input and create a similar macroexpand hook without duplication

borkdude17:11:36

well, try it ;)

borkdude17:11:54

I think there's a number of caveats though which is why I haven't done it myself

👍 1
Noah Bogart17:11:12

yeah no doubt i'll run headfirst into them, but it's fun to try