clj-kondo

https://github.com/clj-kondo/clj-kondo
imre 2021-04-23T08:22:11.325100Z

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

borkdude 2021-04-23T08:35:59.325400Z

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

borkdude 2021-04-23T08:36:20.325800Z

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.

borkdude 2021-04-23T08:56:03.326500Z

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

❤️ 1
imre 2021-04-28T18:17:37.370600Z

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

imre 2021-04-28T18:18:07.370800Z

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

borkdude 2021-04-28T18:20:08.371Z

>/dev/null 2>&1
perhaps?

imre 2021-04-28T18:52:59.371200Z

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

imre 2021-05-03T18:51:01.401600Z

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

borkdude 2021-05-03T18:51:17.401800Z

:thumbsup:

borkdude 2021-04-23T08:56:11.326800Z

Then no findings will be reported at all

2021-04-23T10:34:44.327500Z

@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?

borkdude 2021-04-23T10:37:01.328400Z

@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

2021-04-23T10:37:18.328800Z

ah gotcha

borkdude 2021-04-23T10:37:19.328900Z

and we already have an :output config entry

2021-04-23T10:37:46.329500Z

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

borkdude 2021-04-23T10:38:35.329800Z

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

👍 1
2021-04-23T10:40:13.330800Z

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

imre 2021-04-23T12:20:24.331Z

thank you, will have a look at it

borkdude 2021-04-23T12:53:17.331900Z

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

6
Stefan 2021-04-23T15:37:48.335100Z

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)

borkdude 2021-04-23T16:41:10.335700Z

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

borkdude 2021-04-23T16:42:17.336100Z

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

borkdude 2021-04-23T17:25:23.336700Z

That has been corrected since ages

Stefan 2021-04-23T17:26:22.337400Z

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

Stefan 2021-04-23T17:26:43.337900Z

But thanks for helping out, it works now! 🎉

🎉 1