This is a strategy I use to find unused code in ruby projects. These instructions are for macOS, but you only need access to the tools for this to work.
- Install unused following the instructions here
- Install universal-ctags. I use the brew instructions here
- Generate your tag file from your project root, including your library methods as well. I typically run
/usr/local/bin/ctags . $(bundle list --paths)
to add all of my library methods for the project. This has some other benefits, like allowing code-jumping in vimBonus: You can set this command up as a git hook to run every time you make changes to your code locally. I have an example of this here
- Once this command is done, you can look at the
tags
file in your repository root to make sure it's populated with data correctly (`cat tags | w