If cargo-sort (without arguments) is run in a workspace, the -w/--workspace option needs to be passed in order to sort the Cargo.toml files for all packages; in particular, users of the cargo-sort pre-commit hook currently have to add args: ["--workspace"] to their pre-commit config in order to get the behavior that I am sure 99% of users expect. On the other hand, in a non-workspace, adding the --workspace option does not seem to produce a change in behavior or any adverse effects. It would thus seem to make things all around more convenient if args: ["--workspace"] were added to .pre-commit-hooks.yaml — or is there some reason not to do this?
If
cargo-sort(without arguments) is run in a workspace, the-w/--workspaceoption needs to be passed in order to sort theCargo.tomlfiles for all packages; in particular, users of thecargo-sortpre-commit hook currently have to addargs: ["--workspace"]to their pre-commit config in order to get the behavior that I am sure 99% of users expect. On the other hand, in a non-workspace, adding the--workspaceoption does not seem to produce a change in behavior or any adverse effects. It would thus seem to make things all around more convenient ifargs: ["--workspace"]were added to.pre-commit-hooks.yaml— or is there some reason not to do this?