Unused
Unused identifies unused code in Rails, Phoenix, and other types of applications, improving developer productivity
Installing and Updating
Homebrew (Recommended)
You can install the formulae via Homebrew with brew tap:
brew tap unused-code/formulaeNext, run:
brew install unusedThis will install unused and its corresponding dependencies.
To update, run:
brew update
brew upgrade unusedPrerequisites
It is strongly recommended you install Universal Ctags to generate tags files. Universal Ctags supports more languages and has native parsers for a good number of them, resulting in faster tags generation time.
It is also recommended that you have a tags file generated on a semi-regular basis. Tim Pope wrote an article about wiring up ctags generation with a git hook. thoughtbot's dotfiles also reference a ctags git hook.
Usage
From your project directory, run:
unusedThis will generate a list of tokens and corresponding definition locations for removal consideration.
You can see supported command-line flags with:
unused --helpTroubleshooting
If you run into trouble, run
unused doctorThis will perform a series of simple checks to help identify obvious issues with configuration.
License
Copyright 2020 Josh Clayton. See the LICENSE.
