Fork me on GitHub

has someone posted a linter for the else->> macro? It's a mind-bending piece of code and I would happily replace better-cond if it means clj-kondo can better lint my code 🙂


@pithyless I think it’s not hard to write a hook for this


yeah, I figured a hook for this is easier to write, than for parsing better-cond; I was just hoping someone had already done it ;]


if no one has, I guess I'll take a stab at it later


I'm trying out the new "unresolved var" linter. I'm wondering why it doesn't always work. Repro:

(require '[ :as t.n.r])

(require '[clojure.set :as set])
It reports set/onion, but not t.n.r/nope.


@flowthing the reason (probably) is, is that hasn't been analyzed/linted, but clj-kondo knows about a few built-in libraries like clojure.set already


Aha. Is that something I can fix by configuring clj-kondo?


to lint this library, make a .clj-kondo dir in your project root and then lint everything using clj-kondo --no-warnings --parallel --lint <classpath> where <classpath> is some build-tool specific thing like $(clojure -Spath)


Thanks! I'll give that a try. Guess I should RTFM. 🙂


If you use clojure-lsp then it will do this for you, I think


any time you open a project


OK — I don't use it at the moment, though, but good to know.


Yeah, your suggestion fixed the issue -- many thanks!


(Also for clj-kondo itself — it's absolutely fantastic.)


Hi! I have an issue that after some time of digging on it, did not found a solution. I have a macro that "reexports" some vars, so the code looks like (d/export somens/somesymthatpointstovar) , now clj-kondo raises the warning about unresolved var when using anything that is exported using this macro. I tried to use it like lint-as with clojure.core/declare and it does not have any effect (indeed because the warning is not caused by the macro export ; is cause by the use of the results of this macro. There are any hint on how to fix it?


@niwinz There are multiple ways to solve this. 1) You can configure the :unresolved-var linter to turn off warnings for this namespace. See docs here: 2) You can write a hook to make clj-kondo understand your macro. See


hmm i was not aware about hooks for this case, thanks for the hint


@borkdude thanks, that worked