clj-kondo 2025-08-06

I'm curious why https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#unresolved-symbol has a default level :error, while https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#unresolved-var has a default level :warning. I expected both to give :error. Is it to avoid false positives for code bases where namespaces are built dynamically, for example with intern?

✅ 1

understood. Thanks!

Hello, the docs say this: > Clj-kondo only expands a selected set of macros from clojure.core and some popular community libraries. Where can I find the list of supported macros? (in order to try to find a comparable one to configure :lint-as to use)

nowadays most of if not all of the clojure stdlib

if you give me your macro (usage) I can make a guess

I see some macro expansion here https://github.com/clj-kondo/clj-kondo/blob/master/src/clj_kondo/impl/macroexpand.clj but where are the others? Or are they scattered across various source files?

scattered

👍 1
👍🏻 1

I don't think there are any exact matches (for lint-as purposes) in stdlib, I'm more interested in the macros from popular community libraries

clj-kondo understands most if not all of clojure.core so just try and see

you're just curious in general, not for a specific problem/solution?

I guess you could search github for files named config.edn with the keyword :lint-as in it

I have a macro that looks like (with-foo [foo] ...) and it binds foo within its body. I want to avoid unresolved-symbol warnings for foo . I'm looking for a macro that is already supported that looks like this.

I figured if there was a list I could scan I could look for plausible candidates

Not a big deal to work around if that doesn't exist though

there is one macro named cljs.test/async which is like this but without wrapping the binding in a vector:

(with-foo foo ...)
but usually macros like this have a value next to the binding, similar to let, so I don't think there is one similar to this. you could just write a :hooks {:macroexpand ...} thing and copy your macro perhaps

next.jdbc has macros that take [sym val opts] which is "similar" (`opts` is not a binding). Here's the hook ns for those https://github.com/seancorfield/next-jdbc/blob/develop/resources/clj-kondo.exports/com.github.seancorfield/next.jdbc/hooks/com/github/seancorfield/next_jdbc.clj_kondo