Fork me on GitHub
#clj-kondo
<
2023-06-16
>
Alexander Kouznetsov00:06:28

If clj-kondo gives me incorrect unused-namespace warning, what’s the best way to debug to find the root cause? I see that this namespace is being used within my macro that uses clj-kondo/lint-as 'clojure.core/def setting so I’d expect it to be linted more or less correctly.

borkdude06:06:52

Can you give a repro?

emilaasa11:06:39

My debugging of the same issue usually ends up with me finding a shadowed var somewhere. 🙂

Alexander Kouznetsov18:06:52

I currently don’t know how to give a repro. It is one file in the private repository that has this issue. I can experiment trying to find what’s triggering it but I’m wondering if I can collect some debug info somehow. Shadowed var sounds like a very plausible explanation even though so far I haven’t found it.

borkdude18:06:08

Is this a .cljc file? Without any repro it’s difficult to say something about it

Alexander Kouznetsov18:06:35

That’s a .clj file.