Skip to content

Commit

Permalink
Merge #165
Browse files Browse the repository at this point in the history
165: Support short flags of --release and --features r=taiki-e a=taiki-e

- `--release` (`-r`) rust-lang/cargo#10133
- `--features` (`-F`) rust-lang/cargo#10576


Co-authored-by: Taiki Endo <te316e89@gmail.com>
  • Loading branch information
bors[bot] and taiki-e authored May 11, 2022
2 parents fa586d0 + c5b831f commit 1bd795c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,13 @@ OPTIONS:
-j, --jobs <N>
Number of parallel jobs, defaults to # of CPUs

--release
-r, --release
Build artifacts in release mode, with optimizations

--profile <PROFILE-NAME>
Build artifacts with the specified profile

--features <FEATURES>
-F, --features <FEATURES>
Space or comma separated list of features to activate

--all-features
Expand Down
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ pub(crate) struct BuildOptions {
#[clap(short, long, value_name = "N")]
pub(crate) jobs: Option<u32>,
/// 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
Expand All @@ -349,7 +349,7 @@ pub(crate) struct BuildOptions {
#[clap(long, value_name = "PROFILE-NAME")]
pub(crate) profile: Option<String>,
/// 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<String>,
/// Activate all available features
#[clap(long)]
Expand Down
4 changes: 2 additions & 2 deletions tests/long-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ OPTIONS:
-j, --jobs <N>
Number of parallel jobs, defaults to # of CPUs

--release
-r, --release
Build artifacts in release mode, with optimizations

--profile <PROFILE-NAME>
Build artifacts with the specified profile

--features <FEATURES>
-F, --features <FEATURES>
Space or comma separated list of features to activate

--all-features
Expand Down
4 changes: 2 additions & 2 deletions tests/short-help.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ OPTIONS:
-j, --jobs <N>
Number of parallel jobs, defaults to # of CPUs

--release
-r, --release
Build artifacts in release mode, with optimizations

--profile <PROFILE-NAME>
Build artifacts with the specified profile

--features <FEATURES>
-F, --features <FEATURES>
Space or comma separated list of features to activate

--all-features
Expand Down

0 comments on commit 1bd795c

Please sign in to comment.