Static analysis and unused CLJ function

Managing a group project here and we found functions that have slipped into disuse over some of our refactorings. There are probably more. I looks like Yagni is one tool for finding these things in your code, although it hasn’t been updated in a while. Does anyone use this or alternatives for finding unused functions?

I believe @borkdude’s GitHub - borkdude/carve: Carve out the essentials of your Clojure app might be what you are looking for, admittedly it is still experimental.


Carve can do this, like @royalaid mentioned. Or you can script your own solution based on clj-kondo’s analysis output.

If you are using clojure-lsp it will also show the number of usages in lens-mode.

1 Like