clj-kondo

James Amberger 2025-09-28T01:46:18.984279Z

not sure what is going on here. I have {:lint-as {a-macro clojure.core/let}} in ~/.config/clj-kondo/config.edn but if I have (a-macro [a 5 b 6]) in the code, clj-kondo --lint reports “Unresolved symbol :b”

lread 2025-09-28T02:07:27.392859Z

Did you qualify a-macro with its namespace? {:lint-as {my.ns.here/a-macro clojure.core/let}}

👍 1
James Amberger 2025-09-28T11:11:55.721289Z

Ah:

$ echo '(require (quote [my-ns :refer [*let]])) (*let [a 5 b 6] [a b])' | clj-kondo --cache=false --config '{:lint-as {my-ns/*let clojure.core/let}}' --lint -

errors: 0
$ echo '(*let [a 5 b 6] [a b])' | clj-kondo --cache=false --config '{:lint-as {my-ns/*let clojure.core/let}}' --lint - 

error: unresolved symbol: a, b
so it’s for want of the require that it fails. But it seems you don’t actually need to qualify the symbol in the config:
$ echo '(require (quote [my-ns :refer [*let]])) (*let [a 5 b 6] [a b])' | clj-kondo --cache=false --config '{:lint-as {*let clojure.core/let}}' --lint -

errors: 0

James Amberger 2025-09-28T11:13:39.783829Z

Motivation: I had interned *let in clojure.core so there was no mention of it in a :refer , and couldn’t figure out why it wasn’t linting as let as config’d.