Fork me on GitHub
#clj-kondo
<
2019-11-20
>
pithyless10:11:08

Has anyone got clj-kondo working with better-cond? It'd be nice to get better support for it's non-standard use of :let [..], etc. For now, I'm just using:

{:unresolved-symbol {:exclude [(better-cond.core/cond)]}}

borkdude10:11:41

@pithyless I'm not familiar with better-cond. Can you post some examples to give me an idea?

pithyless10:11:55

I probably can't do it more justice than this example from the README: https://github.com/Engelberg/better-cond#usage

pithyless10:11:20

But for purpose of clj-kondo, I think this is the crux of it:

(b/cond
  :let [num 42]
  (= num 42) :life)

pithyless10:11:06

kondo is highlighting the num in let as unresolved

borkdude10:11:41

probably the config you're using is best for now. I don't see enough similarity with other built-in macros

pithyless10:11:40

Yeah, I think you would need to be able to traverse and evaluate (psuedocode):

[(:symbol better-cond.core/cond) [:* (:pairs [:keyword :let] [:eval-like clojure.core/let-bindings])]]

eelke14:11:18

Hey! Love clj-kondo. Currently adding it to CI. One question: can the program ignore all warnings and only fail if there are errors?

eelke14:11:09

Or is it only able to suppress warnings on specific symbols?

delaguardo15:11:34

you can ignore exit codes lower than 3 in CI to fail only in case of error

borkdude16:11:02

also each linter's level is configurable, so if you want to disable one kind of linter, you can set its level to :off in the configuration

borkdude16:11:13

or to :warning, :error or :info