Skip to content

Badgers v2.1.0

Choose a tag to compare

@devgony devgony released this 31 Jul 02:26
· 24 commits to main since this release

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/BRH and FN/FNDA/FNF/FNH records, 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_lines lists 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 in badgers cov/badgers diff output.
  • Gates (opt-in): badgers cov --fail-on-partial-branches and the fail-on-partial-branches action input. Both fail closed: enabling the gate without branch data in the report is an error.
  • Diff hardening: changed-line extraction now passes --find-renames explicitly so diff.renames=false environments cannot inflate renames into full-file changes.
  • Storage: snapshot push refuses artifacts larger than the 64 MiB limit readers enforce.

Enabling branch data

  • Python: coverage run --branch (then coverage 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