seattlerb/debride

debride_rm doesn't actually work

Closed this issue · 4 comments

I might be missing something obvious, but this doesn't work for me.

The debride output is in a format like this:

   method_name                    ./file/name.rb:203-207

But the debride_rm script seems to be expecting a single line only, and reports everything as 'unparsed'.

We might just need to change a few lines here to optionally parse the line range and add each line to the array.

debride/bin/debride_rm

Lines 55 to 58 in 5078ab0

when /^ (\S+)\s+(\S+):(\d+)$/ then
name, path, line = $1, $2, $3.to_i
nuke[path] << [line, name]
count += 1

However I don't have time right now to try it.

If you're insane enough to do this... send me a PR

I'm starting to poke at this... not sure if I'm going to just patch this sketchy script or do a full revamp.

I kinda want to teach it VC or provide some option for a command string to run between changes so it can commit each removal.

This works now. Release coming soonish.