Fork me on GitHub
#clj-kondo
<
2022-03-01
>
Israel Gerbi10:03:49

Hey @borkdude! A question about disabling specific linter / file I have a file named unleash_client.clj with a public method called enabled? Currently, all usages of this method are removed though I get the following error when running lein lint:

=================== WARNING: Parents ======================
==    Could not find any references to the following     ==
===========================================================

af-wh-engmnt.utils.unleash-client/enabled?

================== WARNING: Children ======================
==   The following have references to them, but their    ==
==   parents do not.                                     ==
===========================================================

af-wh-engmnt.utils.unleash-client/get-context
Subprocess failed
I have tried to disable this warning for this specific file / method in a few ways using the https://cljdoc.org/d/clj-kondo/clj-kondo/2020.02.15/doc/configuration, nothing worked Any ideas?

Israel Gerbi10:03:47

my last attempt of the .clj-kondo/config.edn file:

{:linters {:unresolved-symbol {:exclude [(clojure.core.match/match)
                                         (compojure.core/routes)
                                         (net.cgrand.enlive-html/deftemplate)
                                         (manifold.deferred/let-flow')
                                         (mount.core/defstate)]
                               :level :info}
           :unused-referred-var {:level :warning
                                 :exclude {taoensso.timbre [info spy debug error warn]}}
           :unused-binding {:exclude-destructured-keys-in-fn-args true
                            :level :warning}
           :unused-namespace {:exclude [taoensso.timbre]
                              :level   :off}
           :invalid-arity {:skip-args [clojure.core.match/match]}
           :consistent-alias {:level   :warning
                              :aliases {clojure.string string
                                        clojure.set set
                                        clojure.walk walk
                                        af-wh-engmnt.utils.json json}}}
 :output {:exclude-files ["src/af_wh_engmnt/utils/unleash_client.clj"]}
 :skip-comments true
 :lint-as {mount.core/defstate clojure.core/def}}

borkdude10:03:22

I do not recognize those warnings as something that comes from clj-kondo

borkdude10:03:47

If you can provide a full standalone repro, I can take a look, but not with only the information you posted above.

Israel Gerbi11:03:39

sure I’ll provide one, thanks!

Israel Gerbi11:03:26

doubled checked, you’re right, it doesn’t come from clj-kondo, rather than a library called https://github.com/venantius/yagni I’ll search for a solution there, thanks!