Fork me on GitHub
#clj-kondo
<
2022-06-20
>
uwo16:06:43

Is there a way to suppress all warning level linters with the --config flag? I'm having trouble finding it if there is..., e.g. git ls-files -m | xargs clj-kondo --config '{:output {:level :error}}' --lint

borkdude16:06:16

@uwo --fail-level <level>

borkdude16:06:45

but this is only for affecting the exit code

uwo16:06:09

that's still reporting warnings for me. ah, right, I'm just using this for the ouput not the exit code

borkdude16:06:30

I guess you can use grep for now and post an issue (there might already be one for this I vaguely remember)

uwo16:06:05

Yeah, I think there's a stale issue, but it's not a big problem to use grep. Thanks for the help!!

borkdude16:06:11

Comment on the issue if you want to revive it

uwo16:06:56

since this can already be resolved with grep, I don't want to add to the number of things for you to juggle 🙂

borkdude16:06:43

Btw it's also possible to output EDN and then process it using e.g. babashka or clj or jet

metal 1
borkdude16:06:48

$ clj-kondo --lint src --config '{:output {:format :edn}}' | jet -q ':findings (filter (= (quote :error) :level))'

borkdude16:06:23

or:

$ clj-kondo --lint src --config '{:output {:format :edn}}' | jet -t ':findings (filter #(= :error (:level %)))'

uwo20:06:26

On another topic, I see that support for compojure macros is built in to clj-kondo. I'm running the most recent version of clj-kondo available thru brew. Is there an obvious place where I might have misconfigured things? All my defroutes are not being linted as def

borkdude20:06:02

@uwo can you be more specific? compojure support is indeed built-in so you should not have to configure anything

uwo20:06:28

Sorry, that was a confusing statement on my part. I figured i would't need to configure anything, but all the compojure macros are showing up as lint errors.

borkdude20:06:50

Is this compojure.core or some derivate like compojure-api?

uwo20:06:05

ahhh, compojure-api

borkdude20:06:46

yeah, that's not built in

👍 1
uwo20:06:53

Thank you again!