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)]
|
||||
struct Args {
|
||||
/// Examples to build
|
||||
#[clap(value_parser)]
|
||||
examples: Vec<String>,
|
||||
|
||||
#[clap(short, long)]
|
||||
#[clap(short, long, value_parser)]
|
||||
/// Run tests
|
||||
test: bool,
|
||||
|
||||
#[clap(short, long)]
|
||||
#[clap(short, long, value_parser)]
|
||||
/// Run on the given browsers. By default, chromium, firefox, webkit
|
||||
browsers: Vec<String>,
|
||||
|
||||
#[clap(short, long)]
|
||||
#[clap(short, long, value_parser)]
|
||||
/// Stop after this number of frames
|
||||
frames: Option<usize>,
|
||||
}
|
||||
|
||||
@ -15,20 +15,22 @@ mod pretty;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
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
|
||||
threshold: f32,
|
||||
|
||||
#[clap(short, long)]
|
||||
#[clap(short, long, value_parser)]
|
||||
/// Filter spans by name matching the pattern
|
||||
pattern: Option<Regex>,
|
||||
|
||||
#[clap(short, long)]
|
||||
#[clap(short, long, value_parser)]
|
||||
/// Simplify system names
|
||||
short: bool,
|
||||
|
||||
#[clap(value_parser)]
|
||||
trace: String,
|
||||
/// Optional, second trace to compare
|
||||
#[clap(value_parser)]
|
||||
second_trace: Option<String>,
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user