From b9c06b48e18286c5c116b20dfe388751c8e942c2 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Wed, 26 Apr 2023 08:49:44 +0530 Subject: [PATCH] Document that `--diff` implies `--fix-only` (#4098) --- crates/ruff_cli/src/args.rs | 2 +- docs/configuration.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ruff_cli/src/args.rs b/crates/ruff_cli/src/args.rs index 813c34980c..6236f4a2e4 100644 --- a/crates/ruff_cli/src/args.rs +++ b/crates/ruff_cli/src/args.rs @@ -80,7 +80,7 @@ pub struct CheckArgs { #[clap(long, overrides_with("show_fixes"), hide = true)] no_show_fixes: bool, /// Avoid writing any fixed files back; instead, output a diff for each - /// changed file to stdout. + /// changed file to stdout. Implies `--fix-only`. #[arg(long, conflicts_with = "show_fixes")] pub diff: bool, /// Run in watch mode by re-running whenever files change. diff --git a/docs/configuration.md b/docs/configuration.md index dd82244fa7..f9ad5e7712 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -201,7 +201,7 @@ Options: --show-fixes Show an enumeration of all autofixed lint violations --diff - Avoid writing any fixed files back; instead, output a diff for each changed file to stdout + Avoid writing any fixed files back; instead, output a diff for each changed file to stdout. Implies `--fix-only` -w, --watch Run in watch mode by re-running whenever files change --fix-only