3 ms·
There shouldn't be discussion around this topic without mentioning Unused: https://unused.codes https://unused.codes I've run that through many projects over
by jayroh 9y ago
There shouldn't be discussion around this topic without mentioning Unused:
https://unused.codes https://unused.codes
I've run that through many projects over the last year and it's been pretty instrumental in finding the low-hanging stuff easy to pick off.
- joshuadclayton 9y agoBecause Unused can't guarantee non-use (hooray metaprogramming and inheritance chains) it can't guarantee accuracy, but it gets close. `git bisect` and a good test suite is your friend (it also identifies methods/functions that are ONLY ever tested and don't look to be used anywhere else). The underlying premise is that, by leveraging ctags and the ability to search for the presence of tokens within a directory, it can estimate what's used based on occurrence frequency and location. Because of this, it's language-agnostic. Biggest removal I've worked on is ~1500 LOC (a large chunk being JSON); however, I've seen the results from some of our client work at thoughtbot, which have surpassed 3k-4kLOC.