Fork me on GitHub
#clj-kondo
<
2022-11-23
>
Tuomas-Matti Soikkeli10:11:13

any hints why kondo reports warning from this?

borkdude10:11:57

it is unused in the sense that if you write clojure like this:

(do "foo" "bar")
the string "foo" is unused, but clj-kondo doesn't know about the fact macro, perhaps there is a config for it and it can be improved. e.g. with :config-in-call {midje.sweet/fact {:linters {:unused-value {:level :off}}}} or a more sophisticated hook

ericdallo11:11:37

interesting corner case, but agreed, the config could go https://github.com/marick/Midje/blob/master/test-resources/clj-kondo.exports/marick/midje/config.ednfor all midje users, the same for facts , tabular I suppose

Tuomas-Matti Soikkeli15:11:12

thanks for the clairification, looked into config.edn and still a bit unsure how all the different macros should be configured, at least tabular gives me warnings and something like

(:require [com.rpl.specter :refer [transform ALL]])
gives me unresolved var

borkdude15:11:12

we can maybe make a clj-kondo configs library for that one (https://github.com/clj-kondo/configs)

ericdallo15:11:59

Or open a PR on to make specter export clj-kondo config like midje, right?

borkdude15:11:25

Nathan didn't want to include it in specter because "it would make the artifact bigger" 😂

ericdallo15:11:05

really? 😮

ericdallo15:11:56

so, adding to clj-kondo/configs seems the "best" option indeed

borkdude15:11:04

at least at the time (ca. 1 year ago). we could try ask again