matcher-combinators

Pavel Meledin 2023-12-31T12:33:50.129149Z

is there a way to import match? so clj-kondo (using Calva) be satisfied. see the screenshot with the linter error. I did see the comment that linter won’t pass on the check, but may be there is any progress on this front ?

fuad 2024-01-08T16:01:35.520279Z

I usually import it like this: [matcher-combinators.test :refer [match?]]

πŸ™ 1
borkdude 2023-12-31T12:53:02.201909Z

{:linters {           :unresolved-symbol {:exclude [(kitchen-async.promise/catch)
                                         (pottery.core/make-extractor)
                                         (cljs.test/is [match?])
                                         (clojure.test/is [match?])
                                         (taoensso.nippy/extend-freeze)
                                         (taoensso.nippy/extend-thaw)
                                         (user/jit)]}
}}
This is an excerpt from a closed source project

πŸ™ 1
ericdallo 2023-12-31T19:47:23.500339Z

I suggest you add to .clj-kondo/config.edn:

{:config-paths ["nubank/matcher-combinators"]}
that should be enough https://github.com/nubank/matcher-combinators/blob/master/resources/clj-kondo.exports/nubank/matcher-combinators/config.edn

πŸ™ 1
borkdude 2023-12-31T19:50:43.535059Z

this shouldn't even be necessary. just lint your dependencies with clj-kondo --lint "$(clojure -Spath)" --dependencies --copy-configs

borkdude 2023-12-31T19:50:50.859999Z

and then it should work

ericdallo 2023-12-31T19:52:56.663949Z

He's using Calva which uses clojure-lsp that already lint like that

ericdallo 2023-12-31T19:53:17.234919Z

and even linting like that, I can't see why would work without that config-paths I mentioned

borkdude 2023-12-31T19:54:00.184099Z

maybe restart calva

borkdude 2023-12-31T19:54:12.413419Z

because the dependency was added later maybe

ericdallo 2023-12-31T19:55:01.876209Z

but eve if the dependency was copied, it's still needed that config-paths right?

borkdude 2023-12-31T19:55:44.640209Z

no

ericdallo 2023-12-31T19:55:46.391979Z

ah I see what you meant

ericdallo 2023-12-31T19:55:49.432509Z

but that won't work

ericdallo 2023-12-31T19:55:57.170199Z

because match? is a little bit magical IIRC

ericdallo 2023-12-31T19:56:04.251659Z

that's why that config was added

ericdallo 2023-12-31T19:56:22.600549Z

would be nice if kondo recognize that, but that doesn't happen for some reason

borkdude 2023-12-31T19:56:54.359109Z

I don't know what you are referring to but the config you linked to should be sufficient. if copied with --copy-configs, it should work

πŸ‘ 1
borkdude 2023-12-31T20:01:26.038289Z

Happy new year!

ericdallo 2023-12-31T20:02:07.450289Z

Happy new year πŸŽ‰ !

Pavel Meledin 2023-12-31T23:32:36.316749Z

thank you! Happy new year! πŸŽ‰