🕷 zenspider.com

by ryan davis



sitemap
Looking for the Ruby Quickref?

Debride gets Whitelisting

Published 2015-03-18 @ 02:00

Tagged debride

I just released debride 1.1.0 and extended it with whitelisting. So previously when you ran debride on your code you might see something like this:

% debride lib

These methods MIGHT not be called:

MyClass
  good_method                         lib/some/file.rb:16
  bad_method                          lib/some/file.rb:20
...

But if you know that good_method is exempt (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 slashes (eg. /^good_/).

If you have any problems with it or have suggestions on how to make it work better for you, please file an issue.