Hello everyone.
I'm happy to announce the initial release of Yagni, a Leiningen plugin for finding unused code.
At a high level, Yagni works by identifying all of the interned vars in the namespaces findable within your :source-paths, and then walking the forms of those vars.
As it walks the forms, it builds a graph of references to other vars. It then searches the graph from a set of entrypoints (by default your project's :main method), and emits warnings for any vars that it couldn't find in the graph's search.
There's some other clever stuff going on there and some options for additional customization as well. I've written up a blog post, located
here, that goes into considerably more detail on how the plugin works and what the project's roadmap looks like.
And, of course, for those of you who just want to get started fiddling, you can add the following to your project's plugins map `[venantius/yagni "0.1.1"]` and type `lein yagni` to give it a whirl.
Cheers!
- V