Skip to content

Commit c21b960

Browse files
authored
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.
1 parent 73ad2af commit c21b960

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

crates/ruff_cli/src/args.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub struct CheckCommand {
116116
#[arg(long, value_enum)]
117117
pub target_version: Option<PythonVersion>,
118118
/// Enable preview mode; checks will include unstable rules and fixes.
119-
#[arg(long, overrides_with("no_preview"), hide = true)]
119+
#[arg(long, overrides_with("no_preview"))]
120120
preview: bool,
121121
#[clap(long, overrides_with("preview"), hide = true)]
122122
no_preview: bool,

docs/configuration.md

+2
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ Options:
212212
Specify file to write the linter output to (default: stdout)
213213
--target-version <TARGET_VERSION>
214214
The minimum Python version that should be supported [possible values: py37, py38, py39, py310, py311, py312]
215+
--preview
216+
Enable preview mode; checks will include unstable rules and fixes
215217
--config <CONFIG>
216218
Path to the `pyproject.toml` or `ruff.toml` file to use for configuration
217219
--statistics

0 commit comments

Comments
 (0)