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
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:

View file

@ -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)]

View file

@ -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)