jendrikseipp / vulture

Find dead Python code
MIT License
3.41k stars 150 forks source link

Add a summary after running the command #238

Closed jonathan-s closed 3 years ago

jonathan-s commented 3 years ago

It would be useful with a summary. Two statistics that comes to mind are.

jendrikseipp commented 3 years ago

I agree that these statistics are interesting, but I wouldn't bake them into Vulture. Instead, you can use vulture *.py | wc -l to count the places with dead code.

jonathan-s commented 3 years ago

Yeah, wc -l works for counting the number of lines. Do you also have a neat of way of collecting the number of lines each place is responsible for?

Ie sum the value where 135 is located. That seems a lot trickier.

apps/februus/handlers/gnip.py:19: unused class 'GnipHandler' (60% confidence, 135 lines)
jendrikseipp commented 3 years ago

For that, I recommend using a suitable awk script (I'm not versed in that, but a stackoverflow search will help you there).