Closed QuiiBz closed 1 year ago
As suggested by @juliusmarminge: https://twitter.com/jullerino/status/1703794047104479562
We should add support for a new --fix option, that will try to fix issues as much as possible. We can add a fn fix(&self) -> bool to the Issue trait, that will be executed on each issue. Returning true means the fix was successful, false that it wasn't: https://github.com/QuiiBz/sherif/blob/7b5a2075ace5d6c6ef88599612826fe4c62d668d/src/rules/mod.rs#L45
--fix
fn fix(&self) -> bool
Issue
true
false
root-package-dependencies
root-package-manager-field
Re-opening, only a single rule is auto-fixable right now.
Released in https://github.com/QuiiBz/sherif/releases/tag/v0.6.0
As suggested by @juliusmarminge: https://twitter.com/jullerino/status/1703794047104479562
We should add support for a new
--fix
option, that will try to fix issues as much as possible. We can add afn fix(&self) -> bool
to theIssue
trait, that will be executed on each issue. Returningtrue
means the fix was successful,false
that it wasn't: https://github.com/QuiiBz/sherif/blob/7b5a2075ace5d6c6ef88599612826fe4c62d668d/src/rules/mod.rs#L4514
17
18
30
31
33
root-package-dependencies
isn't auto fixableroot-package-manager-field
how to detect properly the package manager + version to use?