clj-kondo

erwinrooijakkers 2025-04-23T14:34:49.644179Z

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

borkdude 2025-04-23T14:39:52.409869Z

No, usually these configs are packaged alongside libraries nowadays

👍 1
erwinrooijakkers 2025-04-23T14:59:30.077059Z

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

erwinrooijakkers 2025-04-23T14:59:50.834419Z

great tool

erwinrooijakkers 2025-04-23T15:00:56.082709Z

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
Samuel Ludwig 2025-04-23T15:48:43.704759Z

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)

borkdude 2025-04-23T15:51:46.343969Z

you can when you run clj-kondo using clojure

borkdude 2025-04-23T15:52:05.857179Z

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

Samuel Ludwig 2025-04-23T15:56:46.055129Z

nice! appreciated monsieur

Samuel Ludwig 2025-04-23T19:39:36.363379Z

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

borkdude 2025-04-23T19:44:55.208189Z

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

borkdude 2025-04-23T19:45:32.442919Z

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

Samuel Ludwig 2025-04-23T19:48:27.288249Z

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/

borkdude 2025-04-23T19:49:04.892699Z

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

ericdallo 2025-04-23T19:51:17.073549Z

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

ericdallo 2025-04-23T19:52:04.665289Z

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

Samuel Ludwig 2025-04-23T20:04:53.198509Z

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

ericdallo 2025-04-23T20:21:54.124679Z

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

Samuel Ludwig 2025-04-23T20:24:21.141419Z

😅 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