Skip to content

Commit

Permalink
Suggest cargo vet fmt for formatting errors
Browse files Browse the repository at this point in the history
Unlike the previous suggestion of `cargo vet`, this will reformat the
incorrectly formatted document even if the tree currently fails to vet.

Fixes #617
  • Loading branch information
mystor committed Jul 9, 2024
1 parent 25f4898 commit 1ac96a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ pub struct InvalidCriteriaError {

#[derive(Debug, Error, Diagnostic)]
#[error("A file in the store is not correctly formatted:\n\n{unified_diff}")]
#[diagnostic(help("run `cargo vet` without --locked to reformat files in the store"))]
#[diagnostic(help("run `cargo vet fmt` to reformat files in the store"))]
pub struct BadFormatError {
pub unified_diff: String,
}
Expand Down

0 comments on commit 1ac96a6

Please sign in to comment.