Fork me on GitHub
#clj-kondo
<
2022-04-03
>
Carlo16:04:37

is there a configuration to prevent clj-kondo to trigger the unresolved symbol warning on logical variables (ie. symbols that start with ? , used in some dsls like #meander)?

borkdude16:04:49

Right now no, but this is something I would consider, e.g. exclude by regex

🙌 1
😍 1
Carlo16:04:08

is my best bet for now to turn off the whole unresolved symbol category?

wilkerlucio13:04:38

maybe this can help you, this is how I'm handling Meander in Kondo nowadays:

:linters {:unresolved-symbol {:exclude [(meander.epsilon/match)
                                         (meander.epsilon/find)
                                         (meander.epsilon/search)
                                         (meander.epsilon/rewrite)]}}

🙌 1
borkdude16:04:09

Please file an issue with a good explanation and examples. @dpsutton I saw a couple of these variables in Metabase's code-base too, right?

👍 1
borkdude16:04:40

@meditans Oh god, no, you can disable it for only some calls, like :exclude [(meander.epsilon/match)]

😂 1
❤️ 2
dpsutton16:04:10

i think that's unrelated. we have lots of $id type variables which are a dsl macro to pull from databases at test run time

borkdude16:04:39

yes, but the relation would be that those variables are sometimes also unresolved, if you don't have special hooks for those macros - maybe I'm wrong

dpsutton16:04:13

yes good point. they are unresolved and symbols that get meaning from the macro itself and not a previous definition

borkdude16:04:09

right, so a regex exclusion would also work for that