Fork me on GitHub

hey @borkdude! does / will clj-kondo report on unused vars at all, e.g. after linting the whole classpath? like unused private vars, but also non-private vars. this isn't useful for libraries, but it's very useful for apps!


@robert-stuttaford That requires seeing the entire project first and this is the reason why clj-kondo won't report it in the editor, since it could also result in false positives (have we seen all the things? do we know for sure? it's an open world...) But... you can use the analysis export and script it yourself:


Another reason it's not reported in the editor is performance: we would have to load the entire cache for every editor action, which is costly


ok, that makes sense. that a script exists and i can use it is plenty good enough for me 👍


There have been some thoughts about making a cider middleware that invokes clj-kondo on the classpath and then uses the analysis export to make squiggles, so an on-demand action. I'd like to see someone pick this up some time


@robert-stuttaford Yes, you can use clj-kondo as a JVM library as well and do fun things with the output


thanks, this is rad 🙂