Commit 604c7d2
replace codecov ignores with coverage(off) for the per-package gate
cargo-coverage-gate (the per-package line-coverage gate anvil runs) evaluates
raw lcov and does not read codecov.yml, so files the repo excludes from Codecov
via `ignore` globs were still gated and failed. Translate the two ignores into
mechanisms the gate honors:
- testing_aids: add crate-level `#![cfg_attr(coverage_nightly, coverage(off))]`
(+ feature gate). It is an internal (publish=false) test-helper crate whose
utilities are exercised opportunistically by other crates' tests, so
per-package coverage is not meaningful. Now reports NO DATA -> OK.
- ohno/src/test_util.rs: the existing module-level coverage(off) was inert for
`assert_error_message!` because a macro body is re-instrumented at each
expansion site and attributed back to this file. Move the assertion logic
into `assert_error_message_impl` (a real `#[doc(hidden)] pub fn`); the macro
now expands to a single call to it. The function is compiled once in ohno
where coverage(off) applies, so test_util.rs no longer contributes
instrumented lines. ohno goes 99.3% -> 100%. The function is `#[track_caller]`
so assertion failures still report at the caller's line (a plain function
would point into test_util.rs). Macro behavior is unchanged (verified: ohno +
http_extensions tests, incl. the should_panic, doctest, and panic location).
- codecov.yml: drop both now-redundant `ignore` entries (the lines no longer
appear in the lcov at all, so Codecov and the gate agree).
NOTE: ohno is published (crates.io v0.3.6); this adds a doc-hidden public helper
(additive, non-breaking) to back the macro.
Remaining: cachet 99.7% (no-default-features-only telemetry fallback arms) is a
genuine gap, not a codecov ignore -- handled separately.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 748230e commit 604c7d2
3 files changed
Lines changed: 35 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
51 | 61 | | |
52 | 62 | | |
53 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
4 | 11 | | |
5 | 12 | | |
6 | 13 | | |
| |||
0 commit comments