From 88885d9c2b6f2ae12e97f17bccb0c7a0225380a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 25 Jul 2023 23:24:06 +0200 Subject: fix(lint): allow to use --rules with --rules-tags (#19754) --- cli/args/flags.rs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'cli/args') 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( @@ -4154,6 +4153,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", -- cgit v1.2.3