Expand description
Changed-line coverage: are the lines this change touches tested?
The denominator is the part that has to be right. It is the intersection of two facts already established elsewhere: the lines a patch added or modified, and the lines the run’s language adapter decided were executable. Taking the intersection means comments, blank lines and declarations are excluded because the adapter already excluded them, not because this module guessed at syntax it does not parse.
Git invocation lives at the edge, in the CLI. Everything here is a pure function of a diff and a run view, so the cases that matter – renames, deletions, comment-only changes, files absent from the recording – are testable without a repository.
Structs§
Functions§
- annotations
- Render GitHub Actions annotations for the uncovered ranges, capped.
- build
- Intersect a patch with what the run measured.
- changed_
lines - Parse
git diff --unified=0output into the lines each file gained. - escape_
message - escape_
property - Escape a value for a GitHub Actions workflow command.
- ranges
- Collapse consecutive uncovered lines into inclusive ranges, so a block of twenty untested lines is one annotation rather than twenty.
Type Aliases§
- Changed
Lines - Added and modified lines per file, as a unified diff describes them.