From c6f4b834c184275298fabaae7b5bd70efe54b29d Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Sat, 15 Apr 2023 14:43:40 +0200 Subject: [PATCH] Fix fmt --- .github/workflows/build.yml | 4 ++-- xtask/src/argument_parsing.rs | 4 ++-- xtask/src/main.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aadb0a9756..f32e506ee0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,8 +31,8 @@ jobs: - name: Cache Dependencies uses: Swatinem/rust-cache@v2 - - name: cargo xtask format-check - run: cargo xtask --verbose format-check + - name: cargo xtask fmt + run: cargo xtask --verbose fmt -c # Compilation check check: diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index 70280171ef..3ee9e34ce5 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -306,9 +306,9 @@ pub enum Commands { pub struct FormatOpt { #[clap(flatten)] pub package: PackageOpt, - /// Apply formatting fixes immediately. + /// Check-only, do not apply formatting fixes. #[clap(short, long)] - pub apply: bool, + pub check: bool, } #[derive(Args, Debug, Clone)] diff --git a/xtask/src/main.rs b/xtask/src/main.rs index eab21b3291..2bfe851f93 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -218,7 +218,7 @@ fn main() -> anyhow::Result<()> { }; let final_run_results = match &cli.command { - Commands::Format(args) => cargo_format(globals, &cargologlevel, &args.package, !args.apply), + Commands::Format(args) => cargo_format(globals, &cargologlevel, &args.package, args.check), Commands::Clippy(args) => { info!("Running clippy on backend: {backend:?}"); cargo_clippy(globals, &cargologlevel, &args, backend)