Fork me on GitHub
#clj-kondo
<
2021-04-23
>
imre08:04:11

Hey all. Does the clj-kondo cli have some sort of quiet switch? I'd like to disable its output when linting deps in CI. Piping it into devnull works fine locally but Jenkins seems to ignore that

borkdude08:04:59

@imre what about piping to /tmp/output.txt ?

borkdude08:04:20

There is an issue here where we discuss such a flag: https://github.com/clj-kondo/clj-kondo/issues/1262 Feel free to read and comment.

borkdude08:04:03

@imre Oh btw, there is already a command line arg for linting deps: --dependencies

❤️ 3
imre12:04:24

thank you, will have a look at it

imre18:04:37

tried that flag and it's almost precisely what I was looking for, thank you

imre18:04:07

However, on subsequent runs it will stderr stuff like mount-0.1.16.jar was already linted, skipping - any way to disable that too?

borkdude18:04:08

>/dev/null 2>&1
perhaps?

imre18:04:59

Yeah, that's what our CI will ignore for some reason. No worries, this is already halfway there, thank you

imre18:05:01

That ended up working actually in the end, thank you!

borkdude08:04:11

Then no findings will be reported at all

rickmoynihan10:04:44

@borkdude: regarding our discussion here: https://github.com/clj-kondo/clj-kondo/issues/1262#issuecomment-824884105 I just tried: clj-kondo --lint ./src --config '{:output {:level :error}}' and it still displays warnings, am I doing something wrong?

borkdude10:04:01

@rickmoynihan We don't yet support that, but it was a proposal, since CLI args should be supported in the programmatic interface as well usually

borkdude10:04:19

and we already have an :output config entry

rickmoynihan10:04:46

I meant to actually ask about that regarding the --fail-level stuff

borkdude10:04:35

the programmatic interface never "fails" so that is pretty CLI specific

👍 3
rickmoynihan10:04:13

yeah it definitely doesn’t make sense for --fail-level itself… anyway good to know that’s generally the intention.

borkdude12:04:17

New clj-kondo release: 2021.04.23 with several bugfixes / improvements. https://github.com/clj-kondo/clj-kondo/blob/master/CHANGELOG.md#20210423

clj-kondo 18
Stefan15:04:48

Hi! I just noticed https://github.com/clj-kondo/clj-kondo/issues/682 and deduced that orchestra defn-spec should now be recognized when configuring it (`orchestra.core/defn-spec clj-kondo.lint-as/def-catch-call}`). It doesn’t seem to work for me though. When I have this in my source code:

(defn-spec xx ::myspec [foo nat-int?] foo)
I get these errors:
src/foo.cljc:103:12: error: Unresolved symbol: xx
src/foo.cljc:103:25: error: Unresolved symbol: foo
Am I doing something wrong? (This is with latest version of clj-kondo btw)

borkdude16:04:10

@stefan.van.den.oord It should be orchestra.core/defn-spec clj-kondo.lint-as/def-catch-all, catch-all, not catch-call

borkdude16:04:17

You are the second person who mentions catch-call, is this a typo somewhere?

borkdude17:04:23

That has been corrected since ages

Stefan17:04:22

Yeah. I got there via the #682 issue. Didn’t spot the error and just copy-pasted it.

Stefan17:04:43

But thanks for helping out, it works now! 🎉

🎉 3