Fork me on GitHub
#clj-kondo
<
2019-11-27
>
tschady19:11:09

is there a way to use the analysis output to ignore certain instances of error/warning? My use case is to have a file of grandfathered errors that I chip away at over time, while disallowing new errors.

borkdude19:11:20

@tws is this for CI usage?

tschady19:11:50

going forward, CI. over time, cleanup a legacy codebase.

tschady19:11:26

e.g. I want docstrings required on all new fns, but too many old ones to handle

tschady19:11:04

seems like saving the analysis output, editing it down to those i want to ignore, and leaving in .clj-kondo/ might work

borkdude19:11:00

@tws 1. save the current findings (EDN output :findings key) somewhere as a baseline 2. save the future findings to a file 3. find only the new findings using a small Clojure script (babashka may come in handy if you want it to be fast). 4. print those findings in CI or do whatever you want to do with it

borkdude19:11:31

something like that

tschady19:11:49

seems reasonable. i was hoping there was some builtin i couldn’t find to #3

borkdude19:11:42

for the printing you could maybe use clj-kondo.core/print!

borkdude19:11:08

Note that clj-kondo also works as a JVM lib, so you can also do it from a small Clojure jvm program

tschady19:11:37

@borkdude love “needs hammock time” swimlane btw. I’m going to steal that.

tschady19:11:34

would you consider this as a feature? happy to make an issue. Basically above. A file inside .clj-kondo/ , probably in analytics format, where duplicate errors/warnings are supressed?

borkdude19:11:39

I think for now it falls more in the category of things you can do with scripting yourself, given the output of clj-kondo. See for examples: https://github.com/borkdude/clj-kondo/tree/master/analysis If enough people are asking for this, I will consider it.

borkdude19:11:24

You can make an issue for it anyway, please be as detailed as possible about your use case.

borkdude19:11:47

And also include the information from this slack conversation

tschady20:11:45

sure. I was asking “no”, or “maybe yes”. Seems like maybe. thanks.

dominicm21:11:16

You should look at revoewdog

👍 4
dominicm21:11:20

It does this for you

borkdude21:11:23

^ @tws (reviewdog)