Fix clap for CI (#5005)
# Objective - Fix CI - relevant clap issue https://github.com/clap-rs/clap/issues/3822 ## Solution - slap `value_parser` on all the clap derives. This tells clap to use the default parser for the type.
This commit is contained in:
parent
b7d784de6e
commit
0560aa5893
@ -6,17 +6,18 @@ use xshell::{cmd, Shell};
|
|||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// Examples to build
|
/// Examples to build
|
||||||
|
#[clap(value_parser)]
|
||||||
examples: Vec<String>,
|
examples: Vec<String>,
|
||||||
|
|
||||||
#[clap(short, long)]
|
#[clap(short, long, value_parser)]
|
||||||
/// Run tests
|
/// Run tests
|
||||||
test: bool,
|
test: bool,
|
||||||
|
|
||||||
#[clap(short, long)]
|
#[clap(short, long, value_parser)]
|
||||||
/// Run on the given browsers. By default, chromium, firefox, webkit
|
/// Run on the given browsers. By default, chromium, firefox, webkit
|
||||||
browsers: Vec<String>,
|
browsers: Vec<String>,
|
||||||
|
|
||||||
#[clap(short, long)]
|
#[clap(short, long, value_parser)]
|
||||||
/// Stop after this number of frames
|
/// Stop after this number of frames
|
||||||
frames: Option<usize>,
|
frames: Option<usize>,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,20 +15,22 @@ mod pretty;
|
|||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
struct Args {
|
struct Args {
|
||||||
#[clap(short, long, default_value_t = 0.0)]
|
#[clap(short, long, value_parser, default_value_t = 0.0)]
|
||||||
/// Filter spans that have an average shorther than the threshold
|
/// Filter spans that have an average shorther than the threshold
|
||||||
threshold: f32,
|
threshold: f32,
|
||||||
|
|
||||||
#[clap(short, long)]
|
#[clap(short, long, value_parser)]
|
||||||
/// Filter spans by name matching the pattern
|
/// Filter spans by name matching the pattern
|
||||||
pattern: Option<Regex>,
|
pattern: Option<Regex>,
|
||||||
|
|
||||||
#[clap(short, long)]
|
#[clap(short, long, value_parser)]
|
||||||
/// Simplify system names
|
/// Simplify system names
|
||||||
short: bool,
|
short: bool,
|
||||||
|
|
||||||
|
#[clap(value_parser)]
|
||||||
trace: String,
|
trace: String,
|
||||||
/// Optional, second trace to compare
|
/// Optional, second trace to compare
|
||||||
|
#[clap(value_parser)]
|
||||||
second_trace: Option<String>,
|
second_trace: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user