Uniformize report_ options

This commit is contained in:
Fabrice Reix 2023-11-02 17:46:15 +01:00
parent 97a02f3990
commit 3551978a95
No known key found for this signature in database
GPG Key ID: BF5213154B2E7155
2 changed files with 12 additions and 12 deletions

View File

@ -327,8 +327,16 @@ pub fn proxy() -> clap::Arg {
.num_args(1) .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 { pub fn report_junit() -> clap::Arg {
clap::Arg::new("junit") clap::Arg::new("report_junit")
.long("report-junit") .long("report-junit")
.value_name("FILE") .value_name("FILE")
.help("Write a JUnit XML report to 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 { pub fn report_tap() -> clap::Arg {
clap::Arg::new("tap") clap::Arg::new("report_tap")
.long("report-tap") .long("report-tap")
.value_name("FILE") .value_name("FILE")
.help("Write a TAP report to FILE") .help("Write a TAP report to FILE")
.num_args(1) .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 { pub fn resolve() -> clap::Arg {
clap::Arg::new("resolve") clap::Arg::new("resolve")
.long("resolve") .long("resolve")

View File

@ -235,7 +235,7 @@ pub fn ip_resolve(arg_matches: &ArgMatches) -> Option<IpResolve> {
} }
pub fn junit_file(arg_matches: &ArgMatches) -> Option<String> { pub fn junit_file(arg_matches: &ArgMatches) -> Option<String> {
get::<String>(arg_matches, "junit") get::<String>(arg_matches, "report_junit")
} }
pub fn max_redirect(arg_matches: &ArgMatches) -> Option<usize> { pub fn max_redirect(arg_matches: &ArgMatches) -> Option<usize> {
@ -302,7 +302,7 @@ pub fn ssl_no_revoke(arg_matches: &ArgMatches) -> bool {
} }
pub fn tap_file(arg_matches: &ArgMatches) -> Option<String> { pub fn tap_file(arg_matches: &ArgMatches) -> Option<String> {
get::<String>(arg_matches, "tap") get::<String>(arg_matches, "report_tap")
} }
pub fn test(arg_matches: &ArgMatches) -> bool { pub fn test(arg_matches: &ArgMatches) -> bool {