seattlerb / debride

Analyze code for potentially uncalled / dead methods, now with auto-removal.
https://www.zenspider.com/projects/debride.html
720 stars 19 forks source link

debride_rm doesn't actually work #45

Closed dacook closed 1 year ago

dacook commented 2 years ago

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'.

dacook commented 2 years ago

We might just need to change a few lines here to optionally parse the line range and add each line to the array. https://github.com/seattlerb/debride/blob/5078ab0c71ccd5f043f74cfa356cc8376079eb36/bin/debride_rm#L55-L58

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

zenspider commented 2 years ago

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

zenspider commented 1 year ago

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.

zenspider commented 1 year ago

This works now. Release coming soonish.