clj-kondo 2025-04-23

is there somewhere a clj-kondo/config.edn available that has all the common lint-as's defined?

No, usually these configs are packaged alongside libraries nowadays

👍 1

after removing the .clj-kondo/.cache/ all the linting worked fine again 🙂

great tool

makes clojure development much easier - mistakes that in the past I spotted only after running the code, I now spot by the squiggly lines.

❤️ 1

Is there a way that I could output the 'total' config that clj-kondo is using for a given lint command? ('total' as in the merged home-config + project .clj-kondo, etc)

you can when you run clj-kondo using clojure

using clj-kondo.core/run! , it returns a :config map

nice! appreciated monsieur

Running into a confusion that has been hard for me to pin down so far, running clj-kondo at the root of a #polylith project, (with the contents of .clj-kondo/config.edn being

{:lint-as {com.rpl.specter/defcollector clojure.core/defn
           com.rpl.specter/defdynamicnav clojure.core/defn
           com.rpl.specter/defmacroalias clojure.core/def
           com.rpl.specter/defnav clojure.core/defn
           com.rpl.specter/defrichnav clojure.core/defn}}
(sorry, i know you get a lot of questions from #specter users)) and I still get a lot of Specter-related 'unresolved var' clj-kondo messages; I think the config is being read but I'm finding it hard to confirm

sorry, I don't know anything about polylith, but a configuration should be at the root of a project, where deps.edn resides. clj-kondo doesn't have the notion of a multi-project setup

you can use a shared configuration by using the :config-paths option though, by liking to another directory that has a config file

ahhh, interesting, i'll give that a try, though polylith isn't exactly multi-project, it does have a less-orthodox file-structure appreciate the pointer o/

perhaps @ericdallo knows how to deal with this as well, I think he mentioned polylith at some point

Yeah, I added support for polylith in clojure-lsp, and clojure-lsp diagnostics feature already uses clj-kondo, so maybe that may work for you

But polylith in the end is just a base deps.edn with multiple local/roots, clojure-lsp just know what are those paths because it runs clj -Spath to get the classpath and pass to kondo

ahhhhhhhhhhhhhhh, clojure-lsp diagnostics does give me the output i expect when i run it from the root! appreciate it very much @ericdallo, it turns out I need to investigate my emacs conf, sorry to gaslight with the initial question @borkdude

Np, you may like format and clean-ns features besides diagnostics too :)

😅 y'kno i kinda just always assumed my machine was just a little 'quirky' and something with my doom-emacs never really wanted to cooperate, and it just turned out clojure-lsp was never being properly used 🌟 🫠

😅 1