From 3551978a954bc3b0ad30187eeeb96b8c4cc5a0bf Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Thu, 2 Nov 2023 17:46:15 +0100 Subject: [PATCH] Uniformize report_ options --- packages/hurl/src/cli/options/commands.rs | 20 ++++++++++---------- packages/hurl/src/cli/options/matches.rs | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/hurl/src/cli/options/commands.rs b/packages/hurl/src/cli/options/commands.rs index 27637660b..ec553db8e 100644 --- a/packages/hurl/src/cli/options/commands.rs +++ b/packages/hurl/src/cli/options/commands.rs @@ -327,8 +327,16 @@ pub fn proxy() -> clap::Arg { .num_args(1) } +pub fn report_html() -> clap::Arg { + clap::Arg::new("report_html") + .long("report-html") + .value_name("DIR") + .help("Generate HTML report to DIR") + .num_args(1) +} + pub fn report_junit() -> clap::Arg { - clap::Arg::new("junit") + clap::Arg::new("report_junit") .long("report-junit") .value_name("FILE") .help("Write a JUnit XML report to FILE") @@ -336,21 +344,13 @@ pub fn report_junit() -> clap::Arg { } pub fn report_tap() -> clap::Arg { - clap::Arg::new("tap") + clap::Arg::new("report_tap") .long("report-tap") .value_name("FILE") .help("Write a TAP report to FILE") .num_args(1) } -pub fn report_html() -> clap::Arg { - clap::Arg::new("report_html") - .long("report-html") - .value_name("DIR") - .help("Generate HTML report to DIR") - .num_args(1) -} - pub fn resolve() -> clap::Arg { clap::Arg::new("resolve") .long("resolve") diff --git a/packages/hurl/src/cli/options/matches.rs b/packages/hurl/src/cli/options/matches.rs index 2bb67ec06..894b7c7a7 100644 --- a/packages/hurl/src/cli/options/matches.rs +++ b/packages/hurl/src/cli/options/matches.rs @@ -235,7 +235,7 @@ pub fn ip_resolve(arg_matches: &ArgMatches) -> Option { } pub fn junit_file(arg_matches: &ArgMatches) -> Option { - get::(arg_matches, "junit") + get::(arg_matches, "report_junit") } pub fn max_redirect(arg_matches: &ArgMatches) -> Option { @@ -302,7 +302,7 @@ pub fn ssl_no_revoke(arg_matches: &ArgMatches) -> bool { } pub fn tap_file(arg_matches: &ArgMatches) -> Option { - get::(arg_matches, "tap") + get::(arg_matches, "report_tap") } pub fn test(arg_matches: &ArgMatches) -> bool {