This commit is contained in:
datdenkikniet 2023-04-15 14:43:40 +02:00
parent feb00a9755
commit c6f4b834c1
3 changed files with 5 additions and 5 deletions

View file

@ -31,8 +31,8 @@ jobs:
- name: Cache Dependencies - name: Cache Dependencies
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: cargo xtask format-check - name: cargo xtask fmt
run: cargo xtask --verbose format-check run: cargo xtask --verbose fmt -c
# Compilation check # Compilation check
check: check:

View file

@ -306,9 +306,9 @@ pub enum Commands {
pub struct FormatOpt { pub struct FormatOpt {
#[clap(flatten)] #[clap(flatten)]
pub package: PackageOpt, pub package: PackageOpt,
/// Apply formatting fixes immediately. /// Check-only, do not apply formatting fixes.
#[clap(short, long)] #[clap(short, long)]
pub apply: bool, pub check: bool,
} }
#[derive(Args, Debug, Clone)] #[derive(Args, Debug, Clone)]

View file

@ -218,7 +218,7 @@ fn main() -> anyhow::Result<()> {
}; };
let final_run_results = match &cli.command { 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) => { Commands::Clippy(args) => {
info!("Running clippy on backend: {backend:?}"); info!("Running clippy on backend: {backend:?}");
cargo_clippy(globals, &cargologlevel, &args, backend) cargo_clippy(globals, &cargologlevel, &args, backend)