Fork me on GitHub
#clj-kondo
<
2022-04-30
>
ericdallo01:04:05

On clojure-lsp we have a feedback progress bar both on Editors and CLI, we update the progress bar at each stage of clojure-lsp startup, and usually the part which takes more time is external analysis (when not cached) and project analysis. ATM we have a (not that) smart update for external deps, updating according to the batch calls to kondo (3 batches means 20/45/60 % for example) and for project analysis we hardcode update to 95%, I was wondering if we could have a kondo hook for each path analyzed so we can have more precise feedback at lsp side 🧵

ericdallo01:04:59

For example, if we know we are calling kondo for a project classpath with 80 filenames, I'd expect kondo to call a callback function 80 times for each file which we could then update the progress bar

ericdallo01:04:59

the 2 call (project source code analysis) is a little bit tricky as we usually pass folders not specific filenames (`[ "src/" "test"` etc), so it'd be fantastic if kondo could expand and return the hooks for each file

ericdallo01:04:11

does that makes sense for kondo?

ericdallo02:04:37

I wonder how that would affect performance, probably not relevant

borkdude11:04:51

higher order function

❤️ 1