xd009642 / tarpaulin

A code coverage tool for Rust projects
https://crates.io/crates/cargo-tarpaulin
Apache License 2.0
2.5k stars 180 forks source link

`fail-under` option in tarpaulin.toml is not working #581

Closed KarthikNedunchezhiyan closed 4 years ago

KarthikNedunchezhiyan commented 4 years ago

cargo tarpaulin --fail-under 50 is working fine but if i mentioned the option in tarpaulin.toml then it is not working.

Additional contexts:

version i am using is 0.14.3.

tarpaulin.toml value

fail-under = 50

I am able to see below error if i mentioned fail-under option in command-line. Below output is not available (also exiting with 0) if i mentioned fail-under in tarpaulin.toml

[ERROR tarpaulin] Coverage is below the failure threshold 40.03421727972626% < 50%
Error: "Coverage is below the failure threshold 40.03421727972626% < 50%"
xd009642 commented 4 years ago

Ah I've cracked it, the config file currently needs fail_under as the key. I've added a patch to rename it the field in serde as it should match the CLI. But until the next version is out you can use fail_under

xd009642 commented 3 years ago

Just letting you know a 0.15.0 will be released today with this fix in