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

❤️ 1
imre12:04:24

thank you, will have a look at it

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

👍 1
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 6
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! 🎉

🎉 1