clj-kondo

teodorlu 2025-08-06T10:19:15.882109Z

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
borkdude 2025-08-06T10:57:58.744439Z

yes

teodorlu 2025-08-06T10:58:15.525269Z

understood. Thanks!

enn 2025-08-06T18:47:38.912009Z

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)

borkdude 2025-08-06T18:48:18.561679Z

nowadays most of if not all of the clojure stdlib

borkdude 2025-08-06T18:48:42.142839Z

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

seancorfield 2025-08-06T18:50:55.035989Z

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?

borkdude 2025-08-06T18:51:06.861999Z

scattered

👍 1
👍🏻 1
enn 2025-08-06T18:51:20.577479Z

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

borkdude 2025-08-06T18:51:27.349299Z

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

borkdude 2025-08-06T18:52:29.760129Z

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

borkdude 2025-08-06T18:52:58.174209Z

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

enn 2025-08-06T18:55:00.297809Z

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.

enn 2025-08-06T18:55:28.821999Z

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

enn 2025-08-06T18:56:00.200469Z

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

borkdude 2025-08-06T18:56:51.326469Z

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

seancorfield 2025-08-06T19:19:36.900099Z

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