From c21b960fc7ac8b60a3d2e5cc753ed4a9ecfde356 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 11 Sep 2023 18:09:58 -0500 Subject: [PATCH] Display the `--preview` option in the CLI help menu (#7274) If we're going to warn on use of NURSERY in #7210 we probably ought to show the `--preview` option in our help menus. --- crates/ruff_cli/src/args.rs | 2 +- docs/configuration.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ruff_cli/src/args.rs b/crates/ruff_cli/src/args.rs index 1c34795cc00ad..18ce203ec0f5b 100644 --- a/crates/ruff_cli/src/args.rs +++ b/crates/ruff_cli/src/args.rs @@ -116,7 +116,7 @@ pub struct CheckCommand { #[arg(long, value_enum)] pub target_version: Option, /// Enable preview mode; checks will include unstable rules and fixes. - #[arg(long, overrides_with("no_preview"), hide = true)] + #[arg(long, overrides_with("no_preview"))] preview: bool, #[clap(long, overrides_with("preview"), hide = true)] no_preview: bool, diff --git a/docs/configuration.md b/docs/configuration.md index 438b1f922d30b..b41204254fb7d 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -212,6 +212,8 @@ Options: Specify file to write the linter output to (default: stdout) --target-version The minimum Python version that should be supported [possible values: py37, py38, py39, py310, py311, py312] + --preview + Enable preview mode; checks will include unstable rules and fixes --config Path to the `pyproject.toml` or `ruff.toml` file to use for configuration --statistics