diff --git a/src/args.rs b/src/args.rs index a2febc7e8..4b1114900 100644 --- a/src/args.rs +++ b/src/args.rs @@ -181,16 +181,16 @@ pub struct ConfigArgs { #[arg(short = 'Z', value_name = "FEATURES", num_args = 0..)] pub unstable_features: Vec, /// Output format of coverage report - #[arg(long, short, value_enum, value_name = "FMT", num_args = 0..)] + #[arg(long, short, value_enum, value_name = "FMT", num_args = 0.., ignore_case = true)] pub out: Vec, /// Coverage tracing backend to use - #[arg(long, value_enum, value_name = "ENGINE")] + #[arg(long, value_enum, value_name = "ENGINE", ignore_case = true)] pub engine: Option, /// Specify a custom directory to write report files #[arg(long, value_name = "PATH")] pub output_dir: Option, /// cargo subcommand to run. So far only test and build are supported - #[arg(long, value_enum, value_name = "CMD")] + #[arg(long, value_enum, value_name = "CMD", ignore_case = true)] pub command: Option, /// Calculates relative paths to root directory. If --manifest-path isn't specified it will look for a Cargo.toml in root #[arg(long, short, value_name = "DIR")] @@ -212,7 +212,7 @@ pub struct ConfigArgs { #[derive(Debug, Clone, Copy, Args)] pub struct LoggingArgs { /// Coloring: auto, always, never - #[arg(long, value_enum, value_name = "WHEN")] + #[arg(long, value_enum, value_name = "WHEN", ignore_case = true)] pub color: Option, /// Show debug output - this is used for diagnosing issues with tarpaulin #[arg(long)] @@ -238,7 +238,7 @@ pub struct PrintFlagsArgs { #[derive(Debug, Clone, Args)] pub struct RunTypesArgs { /// Type of the coverage run - #[arg(long, value_enum, value_name = "TYPE")] + #[arg(long, value_enum, value_name = "TYPE", ignore_case = true)] pub run_types: Vec, /// Test all benches #[arg(long)] diff --git a/src/config/types.rs b/src/config/types.rs index b207d45dc..ed477eef2 100644 --- a/src/config/types.rs +++ b/src/config/types.rs @@ -18,6 +18,7 @@ use std::str::FromStr; ValueEnum, EnumDisplay, )] +#[value(rename_all = "PascalCase")] pub enum Color { Auto, Always, @@ -27,6 +28,7 @@ pub enum Color { #[derive( Debug, Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Deserialize, Serialize, ValueEnum, )] +#[value(rename_all = "PascalCase")] pub enum TraceEngine { Auto, Ptrace, @@ -60,6 +62,7 @@ impl Default for TraceEngine { #[derive( Debug, Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Deserialize, Serialize, ValueEnum, )] +#[value(rename_all = "PascalCase")] pub enum Mode { Test, Build, @@ -68,6 +71,7 @@ pub enum Mode { #[derive( Debug, Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd, Deserialize, Serialize, ValueEnum, )] +#[value(rename_all = "PascalCase")] pub enum RunType { Tests, Doctests, @@ -81,6 +85,7 @@ pub enum RunType { #[derive( Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Deserialize, Serialize, ValueEnum, )] +#[value(rename_all = "PascalCase")] #[non_exhaustive] pub enum OutputFile { Json,