Fork me on GitHub
#clj-kondo
<
2022-02-21
>
ericdallo14:02:43

I noticed something that I'm not sure it's a bug or something to be improved ๐Ÿงต

ericdallo14:02:54

At Nubank we noticed that thrown? was being warned as :unresolved-symbol in a project, after a lot of debugging and unnecessary cache cleaning ๐Ÿ˜‚ we found that when you add a custom exclude config of a linter, clj-kondo stop considering its global config, in this case the global config for thrown? https://github.com/clj-kondo/clj-kondo/blob/master/src/clj_kondo/impl/config.clj#L57, so we needed to include this manually on our config which most users probably won't expect that right?

ericdallo14:02:20

maybe we should have a merge of excludes taking precedence the inputted by user

ericdallo14:02:17

we had this at our config:

:linters {:unresolved-symbol {:exclude #{a-custom-function}}}

ericdallo14:02:33

if we remove this exclude, the thrown? started to work again

borkdude14:02:32

you should use a vector there

borkdude14:02:44

that's probably the issue

borkdude14:02:21

these things are already merged normally, if you use the vector notation

borkdude14:02:25

sequential is appended to sequential

ericdallo14:02:27

๐Ÿคฏ good to know

borkdude14:02:29

set + set is joined as set

borkdude14:02:50

set + vector is undefined, but could probably also do into there

ericdallo14:02:23

even so, I'll change to vector, thank you!

wilkerlucio23:02:52

hello, I notice something with the auto-include feature in kondo, seems like it requires that the library has 2 segments (directories) to pick up, in the case of Promesa which has a single one, it does auto import, but doesn't auto load it, is this expected?

borkdude23:02:42

yes, the config should have two segments

borkdude23:02:32

in the case of promesa, that would probably be: funcool/promesa

borkdude23:02:22

Another reason why it didn't work yesterday @U8WFYMFRU

jaide23:02:17

Ah so should have renamed the .clj-kondo/promesa dir to clj-kondo/funcool/promesa?

borkdude23:02:40

promesa should have done this, but you can fix it locally like that yes

jaide23:02:45

Cool will try that, thought it was working but turned out to just be a delay before raising errors. Ended up going back to local config.edn lint-as, will try it again and try renaming it.

wilkerlucio23:02:39

sorry about that, was my fault, I sent it there and missed the segment

jaide23:02:45

All good, thank you!

borkdude23:02:12

@wilkerlucio Thanks for adding that config, hope that can be fixed in promesa.

wilkerlucio23:02:02

I'm just sending the fixes to them right now ๐Ÿ˜‰

๐ŸŽ‰ 2