Fork me on GitHub
#clj-kondo
<
2023-01-25
>
borkdude10:01:32

Introducing clj-kondo-bb: invoke clj-kondo from babashka scripts (or as a babashka one liner)! clj-kondo babashka https://github.com/clj-kondo/clj-kondo-bb

😎 2
robert-stuttaford12:01:13

hey @U04V15CAJ! will this match the release cadence of the main clj-kondo? could we rely on being able to get the newest version for both bb and jvm at the same time? 😅

borkdude12:01:28

That’s the plan but feel free to bug me any time :)

robert-stuttaford13:01:22

stupendous, thank you sir

chrisetheridge15:01:37

thank you for this @U04V15CAJ! its helped simplify our kondo CI linting set up 🙂

👍 2
Noah Bogart21:01:59

Conundrum: I'm using #malli and I've copied its configs. I'm also using malli's "clj-kondo/emit!" to get updated checks for the function schemas I write. Both of these include :linters {:unresolved-symbol {:exclude [(malli.core/=>)]}}. I'd like to change this to something better, so I've added :lint-as {malli.core/=> clojure.core/def} and :config-in-call {malli.core/=> {:linters {:redefined-var {:level :off}}}} to my base .clj-kondo/config.edn file. However, the (m/=> my-fn [:=> ...]) call still raises a "redefined var" error. Do the library config files get merged in after the project's base config?

2
Noah Bogart21:01:38

I just had the thought that because it's merely merged, I have to use ^:replace in my own config under :linters {:unresolved-symbol {}} . this works but now I lose the library-specific :unresolved-symbol excludes from other libraries. lol Annoying

Noah Bogart21:01:12

Remembering about metadata helped me get it, I think. I've changed the config-in-call to use

:config-in-call {malli.core/=> {:linters {:redefined-var {:level :off}
                                           :unresolved-symbol {:exclude ^:replace []}}}}
Not ideal, but it works for these limited contexts

borkdude21:01:47

If you use mx/defn you can do {:lint-as {malli.experimental/defn schema.core/defn}}

👍 2
Noah Bogart21:01:36

Yeah, I saw that in the docs. Right now we're sticking with m/=> cuz it works better for some folks' tooling, but I'm hopeful we can use that soon

escherize04:01:19

Curious to hear more about that, @UEENNMX0T

Noah Bogart05:01:45

What more do you want to know?

escherize06:01:40

Sorry if that was vague. I’m curious what tooling difficulties your team ran into

Noah Bogart13:01:29

Not everyone uses clj-kondo, mostly the intellij users, so I try to limit macros to those that act very close to normal function calls