Skip to content

Commit

Permalink
Release 0.27.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xd009642 committed Oct 2, 2023
2 parents d3f7cb1 + 5a43dca commit ba971a1
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 30 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
From 2019 onwards, all notable changes to tarpaulin will be documented in this
file.

## [0.27.1] 2023-10-02
### Changed
- Restore casing of enum clap arguments e.g. `--out` so they match old behaviour

## [0.27.0] 2023-09-17
### Added
- Added `--fail-immediately` flag to abort execution the moment the first test failure occurs
Expand Down
28 changes: 14 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-tarpaulin"
version = "0.27.0"
version = "0.27.1"
authors = ["Daniel McKenna <danielmckenna93@gmail.com>"]
description = "Cargo-Tarpaulin is a tool to determine code coverage achieved via tests"
repository = "https://github.com/xd009642/tarpaulin"
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ Arguments:
Options:
--print-rust-flags Print the RUSTFLAGS options that tarpaulin will compile your program with and exit
--print-rustdoc-flags Print the RUSTDOCFLAGS options that tarpaulin will compile any doctests with and exit
--color <WHEN> Coloring: auto, always, never [possible values: auto, always, never]
--color <WHEN> Coloring: auto, always, never [possible values: Auto, Always, Never]
--debug Show debug output - this is used for diagnosing issues with tarpaulin
--verbose Show extra output
-v, --verbose Show extra output
--dump-traces Log tracing events and save to a json file. Also, enabled when --debug is used
--run-types <TYPE> Type of the coverage run [possible values: tests, doctests, benchmarks, examples, lib, bins, all-targets]
--run-types <TYPE> Type of the coverage run [possible values: Tests, Doctests, Benchmarks, Examples, Lib, Bins, AllTargets]
--benches Test all benches
--doc Test only this library's documentation
--all-targets Test all targets (excluding doctests)
Expand Down Expand Up @@ -97,10 +97,10 @@ Options:
--rustflags <FLAGS> Rustflags to add when building project (can also be set via RUSTFLAGS env var)
--objects [<objects>...] Other object files to load which contain information for llvm coverage - must have been compiled with llvm coverage instrumentation (ignored for ptrace)
-Z [<FEATURES>...] List of unstable nightly only flags
-o, --out [<FMT>...] Output format of coverage report [possible values: json, stdout, xml, html, lcov]
--engine <ENGINE> Coverage tracing backend to use [possible values: auto, ptrace, llvm]
-o, --out [<FMT>...] Output format of coverage report [possible values: Json, Stdout, Xml, Html, Lcov]
--engine <ENGINE> Coverage tracing backend to use [possible values: Auto, Ptrace, Llvm]
--output-dir <PATH> Specify a custom directory to write report files
--command <CMD> cargo subcommand to run. So far only test and build are supported [possible values: test, build]
--command <CMD> cargo subcommand to run. So far only test and build are supported [possible values: Test, Build]
-r, --root <DIR> Calculates relative paths to root directory. If --manifest-path isn't specified it will look for a Cargo.toml in root
--manifest-path <PATH> Path to Cargo.toml
--ciserver <SERVICE> CI server being used, if unspecified tarpaulin may automatically infer for coveralls uploads
Expand Down Expand Up @@ -418,7 +418,7 @@ after_success: |
# cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
# Uncomment the following two lines create and upload a report for codecov.io
# cargo tarpaulin --out Xml
# cargo tarpaulin --out xml
# bash <(curl -s https://codecov.io/bash)
fi
```
Expand Down Expand Up @@ -457,7 +457,7 @@ jobs:

- name: Generate code coverage
run: |
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out xml
- name: Upload to codecov.io
uses: codecov/codecov-action@v2
Expand Down Expand Up @@ -599,7 +599,7 @@ its own report implementations.
To generate a `cobertura.xml` simply run the following tarpaulin command:

```text
cargo tarpaulin --out Xml
cargo tarpaulin --out xml
```

Then install `pycobertura` with pip and execute the desired command.
Expand Down
12 changes: 6 additions & 6 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,16 +181,16 @@ pub struct ConfigArgs {
#[arg(short = 'Z', value_name = "FEATURES", num_args = 0..)]
pub unstable_features: Vec<String>,
/// 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<OutputFile>,
/// 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<TraceEngine>,
/// Specify a custom directory to write report files
#[arg(long, value_name = "PATH")]
pub output_dir: Option<PathBuf>,
/// 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<Mode>,
/// 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")]
Expand All @@ -212,13 +212,13 @@ 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<Color>,
/// Show debug output - this is used for diagnosing issues with tarpaulin
#[arg(long)]
pub debug: bool,
/// Show extra output
#[arg(long)]
#[arg(long, short)]
pub verbose: bool,
/// Log tracing events and save to a json file. Also, enabled when --debug is used
#[arg(long)]
Expand All @@ -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<RunType>,
/// Test all benches
#[arg(long)]
Expand Down
5 changes: 5 additions & 0 deletions src/config/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use std::str::FromStr;
ValueEnum,
EnumDisplay,
)]
#[value(rename_all = "PascalCase")]
pub enum Color {
Auto,
Always,
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit ba971a1

Please sign in to comment.