Skip to content

Commit 30b7edd

Browse files
committed
build: add coverage_nightly attr to ignore unit tests code on coverage reports
1 parent ba019d3 commit 30b7edd

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ authors = ["Bitcoin Dev Kit Developers"]
1111
[workspace.lints.clippy]
1212
print_stdout = "deny"
1313
print_stderr = "deny"
14+
15+
[workspace.lints.rust]
16+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage,coverage_nightly)'] }

silentpayments/src/encoding/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ impl TryFrom<&str> for SilentPaymentCode {
377377
}
378378

379379
#[cfg(test)]
380+
#[cfg_attr(coverage_nightly, coverage(off))]
380381
mod test {
381382
use std::str::FromStr;
382383

silentpayments/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
2+
13
pub mod encoding;
24
pub mod hashes;
35
pub mod receive;

0 commit comments

Comments
 (0)