Fork me on GitHub
#clj-kondo
<
2022-11-15
>
skylize02:11:21

Seems like clojure.test.check.clojure-test/defspec should lint correctly without extra config.

skylize04:11:16

Also the spec name gets added to the namespace as a callable function, which should ideally not be considered unresolved. (defspec my-spec ...) (my-spec 20) ; => a quick-check result

seancorfield05:11:08

How would clj-kondo know that if you don't tell it how defspec works? (unless it's built-in to clj-kondo which very few libraries are)

borkdude09:11:59

There is one piece of support in clj-kondo for clojure.test.check: the for-all macro. Maybe we should add support for defspec too, but since it isn't there, your best bet is probably :lint-as {clojure.test.check.clojure-test/defspec clj-kondo.lint-as/def-catch-all} for now. Maybe we should add it to https://github.com/clj-kondo/configs

skylize12:11:18

> How would clj-kondo know...? I am proposing that it should have built-in support.

borkdude12:11:33

issue welcome

👌 1
borkdude12:11:28

> The test.check library is built into Clojure itself to support this This isn't true though, test.check is not a library that comes with Clojure

borkdude12:11:44

but I still want to support this case

skylize14:11:22

Before I wrote that, I double-checked that my tests run okay without depending on it.... but I forgot I have a user alias providing it. facepalm

skylize14:11:32

Edited it out.