mirror of https://github.com/astral-sh/ruff
Add `--version` flag (#222)
This commit is contained in:
parent
9e0daac561
commit
cf6a23b83c
|
|
@ -121,6 +121,8 @@ OPTIONS:
|
||||||
List of error codes to enable
|
List of error codes to enable
|
||||||
-v, --verbose
|
-v, --verbose
|
||||||
Enable verbose logging
|
Enable verbose logging
|
||||||
|
-V, --version
|
||||||
|
Print version information
|
||||||
-w, --watch
|
-w, --watch
|
||||||
Run in watch mode by re-running whenever files change
|
Run in watch mode by re-running whenever files change
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
#[derive(Debug, Parser)]
|
#[derive(Debug, Parser)]
|
||||||
#[clap(name = format!("{CARGO_PKG_NAME} (v{CARGO_PKG_VERSION})"))]
|
#[clap(name = format!("{CARGO_PKG_NAME} (v{CARGO_PKG_VERSION})"))]
|
||||||
#[clap(about = "An extremely fast Python linter.", long_about = None)]
|
#[clap(about = "An extremely fast Python linter.", long_about = None)]
|
||||||
|
#[clap(version)]
|
||||||
struct Cli {
|
struct Cli {
|
||||||
#[clap(parse(from_os_str), value_hint = ValueHint::AnyPath, required = true)]
|
#[clap(parse(from_os_str), value_hint = ValueHint::AnyPath, required = true)]
|
||||||
files: Vec<PathBuf>,
|
files: Vec<PathBuf>,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue