matcher-combinators 2023-12-31

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 ?

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

πŸ™ 1

{: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

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

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

and then it should work

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

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

maybe restart calva

because the dependency was added later maybe

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

ah I see what you meant

but that won't work

because match? is a little bit magical IIRC

that's why that config was added

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

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

Happy new year!

Happy new year πŸŽ‰ !

thank you! Happy new year! πŸŽ‰