Badgers v2.1.0
Branch and function coverage
Badgers now consumes the full practical LCOV surface. When your coverage tool emits branch (BRDA) or function (FN/FNDA) records, Badgers reports them end to end; line-only projects are unaffected.
New
- Parsing:
BRDA/BRF/BRHandFN/FNDA/FNF/FNHrecords, including LCOV-(never-evaluated) semantics, comma-containing function names and branch expressions, and warn-and-skip handling for malformed optional records. - Snapshots: branch and function data stored per file (additive schema; older snapshots stay valid both directions).
- Comparison: branch delta vs the baseline and changed-branch coverage;
partial_lineslists changed lines that executed but still miss a branch outcome. Branch delta is suppressed when either side lacks branch data or the coverage scope changed. - Reports: branch rows in the PR comment and Markdown report, a branch card in the HTML report, and
[changed-branch-partial]markers inbadgers cov/badgers diffoutput. - Gates (opt-in):
badgers cov --fail-on-partial-branchesand thefail-on-partial-branchesaction input. Both fail closed: enabling the gate without branch data in the report is an error. - Diff hardening: changed-line extraction now passes
--find-renamesexplicitly sodiff.renames=falseenvironments cannot inflate renames into full-file changes. - Storage:
snapshot pushrefuses artifacts larger than the 64 MiB limit readers enforce.
Enabling branch data
- Python:
coverage run --branch(thencoverage lcov) - Flutter:
flutter test --coverage --branch-coverage - Rust: nightly
cargo +nightly llvm-cov --branch
Updated examples live in examples/workflows/.
Full Changelog: v2.0.0...v2.1.0