diff --git a/CHANGELOG.md b/CHANGELOG.md index bbd096ee..3e1e1559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com - Set `cfg(coverage_nightly)` when nightly compiler is used. ([#164](https://github.com/taiki-e/cargo-llvm-cov/pull/164)) +- Support short flags of `--release` (`-r`) and `--features` (`-F`). ([#165](https://github.com/taiki-e/cargo-llvm-cov/pull/165)) + ## [0.3.3] - 2022-05-06 - Fix an issue where codes in the target directory are not being properly excluded from reports when using `show-env` subcommand. ([#156](https://github.com/taiki-e/cargo-llvm-cov/pull/156)) diff --git a/README.md b/README.md index 4d7bb2aa..ff838d6e 100644 --- a/README.md +++ b/README.md @@ -207,13 +207,13 @@ OPTIONS: -j, --jobs Number of parallel jobs, defaults to # of CPUs - --release + -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile - --features + -F, --features Space or comma separated list of features to activate --all-features diff --git a/src/cli.rs b/src/cli.rs index a249d91d..246ab89c 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -340,7 +340,7 @@ pub(crate) struct BuildOptions { #[clap(short, long, value_name = "N")] pub(crate) jobs: Option, /// Build artifacts in release mode, with optimizations - #[clap(long)] + #[clap(short, long)] pub(crate) release: bool, /// Build artifacts with the specified profile // TODO: this option is not fully handled yet @@ -349,7 +349,7 @@ pub(crate) struct BuildOptions { #[clap(long, value_name = "PROFILE-NAME")] pub(crate) profile: Option, /// Space or comma separated list of features to activate - #[clap(long, multiple_occurrences = true, value_name = "FEATURES")] + #[clap(short = 'F', long, multiple_occurrences = true, value_name = "FEATURES")] pub(crate) features: Vec, /// Activate all available features #[clap(long)] diff --git a/tests/long-help.txt b/tests/long-help.txt index 310d05cb..1479be35 100644 --- a/tests/long-help.txt +++ b/tests/long-help.txt @@ -166,13 +166,13 @@ OPTIONS: -j, --jobs Number of parallel jobs, defaults to # of CPUs - --release + -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile - --features + -F, --features Space or comma separated list of features to activate --all-features diff --git a/tests/short-help.txt b/tests/short-help.txt index 307cdebc..26e0acde 100644 --- a/tests/short-help.txt +++ b/tests/short-help.txt @@ -126,13 +126,13 @@ OPTIONS: -j, --jobs Number of parallel jobs, defaults to # of CPUs - --release + -r, --release Build artifacts in release mode, with optimizations --profile Build artifacts with the specified profile - --features + -F, --features Space or comma separated list of features to activate --all-features