diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-07-25 23:24:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 17:24:06 -0400 |
commit | 88885d9c2b6f2ae12e97f17bccb0c7a0225380a1 (patch) | |
tree | c888f27ee989ec103df7fcae660e07c75a2b2d4d /cli/args/flags.rs | |
parent | 4a5aaceb26cb7441d0702d30961e0059256826b7 (diff) |
fix(lint): allow to use --rules with --rules-tags (#19754)
Diffstat (limited to 'cli/args/flags.rs')
-rw-r--r-- | cli/args/flags.rs | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/cli/args/flags.rs b/cli/args/flags.rs index 72841df74..d06a17a06 100644 --- a/cli/args/flags.rs +++ b/cli/args/flags.rs @@ -1584,7 +1584,6 @@ Ignore linting a file by adding an ignore comment at the top of the file: .num_args(1..) .action(ArgAction::Append) .use_value_delimiter(true) - .conflicts_with("rules") .help("Use set of rules with a tag"), ) .arg( @@ -4157,6 +4156,32 @@ mod tests { let r = flags_from_vec(svec![ "deno", "lint", + "--rules", + "--rules-tags=recommended" + ]); + assert_eq!( + r.unwrap(), + Flags { + subcommand: DenoSubcommand::Lint(LintFlags { + files: FileFlags { + include: vec![], + ignore: vec![], + }, + rules: true, + maybe_rules_tags: Some(svec!["recommended"]), + maybe_rules_include: None, + maybe_rules_exclude: None, + json: false, + compact: false, + watch: Default::default(), + }), + ..Flags::default() + } + ); + + let r = flags_from_vec(svec![ + "deno", + "lint", "--rules-tags=", "--rules-include=ban-untagged-todo,no-undef", "--rules-exclude=no-const-assign" |