Skip to content

Commit 863838a

Browse files
feat: add arg explanation
1 parent 6b50276 commit 863838a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

crates/cli/src/utils/args.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,39 @@ impl NoIgnore {
276276

277277
#[derive(Args, Debug)]
278278
pub struct SeverityArg {
279+
/// Set rule severity to error
280+
///
281+
/// This flag sets the specified RULE_ID's severity to error. You can specify multiple rules by using the flag multiple times,
282+
/// e.g., `--error=RULE_1 --error=RULE_2`. If no RULE_ID is provided, all rules will be set to error, e.g., `--error`.
283+
/// Note, this flag must use `=` to specify its value.
279284
#[clap(long, action = clap::ArgAction::Append, value_name = "RULE_ID", num_args(0..), require_equals = true)]
280285
pub error: Option<Vec<String>>,
286+
/// Set rule severity to warning
287+
///
288+
/// This flag sets the specified RULE_ID's severity to warning. You can specify multiple rules by using the flag multiple times.
289+
/// If no RULE_ID is provided, all rules will be set to warning.
290+
/// Note, this flag must use `=` to specify its value.
281291
#[clap(long, action = clap::ArgAction::Append, value_name = "RULE_ID", num_args(0..), require_equals = true)]
282292
pub warning: Option<Vec<String>>,
293+
/// Set rule severity to info
294+
///
295+
/// This flag sets the specified RULE_ID's severity to info. You can specify multiple rules by using the flag multiple times.
296+
/// If no RULE_ID is provided, all rules will be set to info.
297+
/// Note, this flag must use `=` to specify its value.
283298
#[clap(long, action = clap::ArgAction::Append, value_name = "RULE_ID", num_args(0..), require_equals = true)]
284299
pub info: Option<Vec<String>>,
300+
/// Set rule severity to hint
301+
///
302+
/// This flag sets the specified RULE_ID's severity to hint. You can specify multiple rules by using the flag multiple times.
303+
/// If no RULE_ID is provided, all rules will be set to hint.
304+
/// Note, this flag must use `=` to specify its value.
285305
#[clap(long, action = clap::ArgAction::Append, value_name = "RULE_ID", num_args(0..), require_equals = true)]
286306
pub hint: Option<Vec<String>>,
307+
/// Turn off rule
308+
///
309+
/// This flag turns off the specified RULE_ID. You can disable multiple rules by using the flag multiple times.
310+
/// If no RULE_ID is provided, all rules will be turned off.
311+
/// Note, this flag must use `=` to specify its value.
287312
#[clap(long, action = clap::ArgAction::Append, value_name = "RULE_ID", num_args(0..), require_equals = true)]
288313
pub off: Option<Vec<String>>,
289314
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy