tbillington / kondo

Cleans dependencies and build artifacts from your projects.
MIT License
1.79k stars 51 forks source link

Feature request: Offer a "dry-run" / "no-to-all" / "report" feature #127

Closed mcclure closed 1 month ago

mcclure commented 2 months ago

Kondo is really nice! But Say I don't want to let Kondo delete anything, right now. Say I just want to know how much space would it free up if I told it to delete all? If I run Kondo and say "n" every time it says

Projects cleaned: 0, Bytes deleted: 0.0B

Which is correct but not what I wanted to know.

I think the best way to implement this would be a --report-only that prints the names of all dirs it would delete if run with -a, then prints the total projects and bytes that would be deleted.

tbillington commented 2 months ago

Hey, thanks for creating this issue.

What information would you like from a report like this? Obviously total amount of bytes reclaimable, but would you want anything else? eg number of projects of different types, statistics, etc.

mcclure commented 2 months ago

@tbillington , thanks, the use case I am envisioning is getting the information to decide "should I run this with -y"? so although those other kinds of information sound interesting I don't think they're useful. The two pieces of information I think are useful are:

This tells me "what is going to be deleted" "what do i get out of it". The list of paths is so I can review to see if there's anything in the list that REALLY shouldn't be deleted.

And if you are going to include those two I think "number of paths deleted" is also worth including.