Fork me on GitHub

I am trying to make a custom macro to be linted as one in another library, specifically I want a while-let macro in a library to be linted as better-cond.core when-let , I have this on clj-kondo.exports

{:lint-as {bortexz.utils.core/while-let better-cond.core/when-let}}
But can’t make it work, on a third library using bortexz.utils.core , both the exported config.edn ’s appear con .clj-kondo (both better-cond config.edn and utils.core config.edn). When I change to lint as clojure.core/when-let, it works properly and doesn’t complain. Any clue how can I solve this? Thanks!


On the other hand, better-cond’s export seems to work fine


This would work if you also include better-cond in your classpath


If this doesn't work, please create a repro and I'll look into it


I am requiring better-cond in bortexz.utils.core, and also tried from the library that uses bortexz.utils.core directly instead of transitively, couldn’t make it work (although the better-cond config.edn works fine)


On it 👍


Hi @U04V15CAJ were you able to have a look at this? Do you want me to open an issue? specifically, in this file for me using Calva it lints the v as being unresolved symbol in while-let, although in .clj-kondo both of these config.edn exist (exported from their own libraries)

;; bortexz.utils.core
 {bortexz.utils.core/while-let better-cond.core/when-let
  bortexz.utils.core/while-some better-cond.core/when-some}}

;; better-cond.code
  {better-cond.core/cond better-cond.core/cond-hook
   better-cond.core/defnc better-cond.core/defnc-hook
   better-cond.core/defnc- better-cond.core/defnc-hook
   better-cond.core/if-let better-cond.core/if-let-hook
   better-cond.core/if-some better-cond.core/if-let-hook
   better-cond.core/when-let better-cond.core/when-let-hook
   better-cond.core/when-some better-cond.core/when-let-hook}}}


Haven't checked, will look now


I can reproduce the issue. clj-kondo issue welcome


Thanks, will open an issue


In my project, clj-kondo does not seem to detect invalid arity errors on method calls coming from dependencies that are imported with :local/root in my deps.edn. Do I need to specify something in particular to enable it?


Dependencies are linted when you provide the classpath. See


Thanks for the answer 🙏 This solved my issue


Does anyone has an example of a project, where the same code is reused between sorce code and clj-kondo hook?

Joshua Suskalo15:08:07

That's not really something I'd do without just copying the code. I guess you could like symlink a file into the directory and get it with require, but that severely limits what you can do in that utility file.


I end up copying the code 🙂 thanks

👍 1