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
@imre what about piping to /tmp/output.txt
?
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.
@imre Oh btw, there is already a command line arg for linting deps: --dependencies
tried that flag and it's almost precisely what I was looking for, thank you
However, on subsequent runs it will stderr stuff like mount-0.1.16.jar was already linted, skipping
- any way to disable that too?
>/dev/null 2>&1
perhaps?Yeah, that's what our CI will ignore for some reason. No worries, this is already halfway there, thank you
That ended up working actually in the end, thank you!
:thumbsup:
Then no findings will be reported at all
@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?
@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
ah gotcha
and we already have an :output
config entry
I meant to actually ask about that regarding the --fail-level
stuff
the programmatic interface never "fails" so that is pretty CLI specific
yeah it definitely doesn’t make sense for --fail-level
itself… anyway good to know that’s generally the intention.
thank you, will have a look at it
New clj-kondo release: 2021.04.23 with several bugfixes / improvements. https://github.com/clj-kondo/clj-kondo/blob/master/CHANGELOG.md#20210423
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)@stefan.van.den.oord It should be orchestra.core/defn-spec clj-kondo.lint-as/def-catch-all
, catch-all
, not catch-call
You are the second person who mentions catch-call
, is this a typo somewhere?
Yeah I copy-pasted that from here: https://github.com/clj-kondo/clj-kondo/commit/fd7dc08d61ce014c171452298cd47139e506d8cd#diff-128a3f9ffa6a6f3863e843089ede6d07010215acf49c66b2d1f1d9baba2f49e7R85
That has been corrected since ages
Yeah. I got there via the #682 issue. Didn’t spot the error and just copy-pasted it.
But thanks for helping out, it works now! 🎉