λ brew install the_silver_searcher
λ cabal install unused
λ unused --help
Unused: Analyze potentially unused code
Usage: unused [-P|--no-progress] [-s|--single-occurrence] [-l|--likelihood ARG]
[-a|--all-likelihoods] [--ignore PATH] [-g|--group-by ARG]
[-C|--no-cache] [--stdin] [--commits ARG] [--search ARG]
Unused allows a developer to leverage an existing tags file (located at
.git/tags, tags, or tmp/tags) to identify tokens in a codebase that are
unused.
Available options:
-h,--help Show this help text
-P,--no-progress Don't display progress during analysis
-s,--single-occurrence Display only single occurrences
-l,--likelihood ARG [Allows multiple] [Allowed: high, medium, low]
Display results based on likelihood
-a,--all-likelihoods Display all likelihoods
--ignore PATH [Allows multiple] Ignore paths that contain PATH
-g,--group-by ARG [Allowed: directory, term, file, none] Group results
-C,--no-cache Ignore cache when performing calculations
--stdin Read tags from STDIN
--commits ARG Number of recent commit SHAs to display per token
--search ARG [Allowed: ag, rg] Select searching backend
CLI USAGE: $ unused
λ git ls-files | xargs ctags
λ unused