Analyze code for potentially uncalled / dead methods.
debride_rails_whitelistto generate an emperical whitelist from logs.
% debride lib These methods MIGHT not be called: MyClass good_method lib/some/file.rb:16 bad_method lib/some/file.rb:20 ...
But you know that good_method is called (perhaps because it is public API), then you can whitelist it:
% echo good_method > whitelist.txt % debride --whitelist whitelist.txt lib These methods MIGHT not be called: MyClass bad_method lib/some/file.rb:20 ...
You can also use regexps in your whitelist by delimiting them with //’s.
gem install debrideIf you want to hack on debride, clone it from GitHub:
git clone git://github.com/seattlerb/debride