Skip to content

Commit c7d52ab

Browse files
authored
Allow uncommitted changes during clippy fix xtask (#8396)
Add flag to allow uncommitted changes when running clippy fix xtask
1 parent 8c0f7b3 commit c7d52ab

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

dev-tools/xtask/src/clippy.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ pub struct ClippyArgs {
1414
/// Automatically apply lint suggestions.
1515
#[clap(long)]
1616
fix: bool,
17+
/// Allow uncommitted changes
18+
#[clap(long)]
19+
allow_dirty: bool,
1720
/// Error format passed to `cargo clippy`.
1821
#[clap(long, value_name = "FMT")]
1922
message_format: Option<String>,
@@ -27,6 +30,10 @@ pub fn run_cmd(args: ClippyArgs) -> Result<()> {
2730
command.arg("--fix");
2831
}
2932

33+
if args.allow_dirty {
34+
command.arg("--allow-dirty");
35+
}
36+
3037
// Pass along the `--message-format` flag if it was provided.
3138
//
3239
// We don't really care about validating that it's a valid argument to

0 commit comments

Comments
 (0)