clj-kondo

magra 2025-07-26T14:49:33.861779Z

I have a macro that provides a function pushto be used in the macro body. Clj-kondo marks this as an unresolved symbol. I have written a hook which should return something like {:node (vary-meta new-node assoc :clj-kondo/ignore [:unresolved-symbol])} . But I want it to ignore only the symbol push, all other unresolved symbols should be reported. What would be the correct syntax for this?

borkdude 2025-07-26T14:50:51.316729Z

it depends on what node you're adding this to, but this should more or less be it

borkdude 2025-07-26T14:51:28.439189Z

perhaps your hook could do something like this:

(let [push ...]
 ...)

borkdude 2025-07-26T14:51:30.936629Z

instead

magra 2025-07-26T14:52:42.396879Z

I tried that. But then I get the warning unused-symbol when the function does not get used.

borkdude 2025-07-26T14:52:58.954969Z

you could just inject a fake usage somewhere

borkdude 2025-07-26T14:53:28.392819Z

like

(let [push ...
      _ (push)]

💡 1
magra 2025-07-26T14:53:59.272439Z

Ah. Jepp!! Thanx!!!

❤️ 1