Boshen / cargo-shear

Detect and remove unused dependencies from Cargo.toml
MIT License
92 stars 5 forks source link

Exit code when performing a fix #51

Closed erwanncloarec closed 5 months ago

erwanncloarec commented 5 months ago

Current behavior:

When performing with success a fix cargo shear --fix the exit code is 1, even if the fix is successful and there is no unused dependencies at the end.

Proposed behavior:

When performing with success a fix cargo shear --fix the exit code is 0 when there is no unused dependencies at the end.

Why:

We can have automatic hooks that will fail even though the fix operation is successful. It's the behavior of other tools like eslint or biome.

Thanks for your work!