every.channel: sanitized baseline

This commit is contained in:
every.channel 2026-02-15 16:17:27 -05:00
commit 897e556bea
No known key found for this signature in database
258 changed files with 74298 additions and 0 deletions

23
scripts/coverage-summary.sh Executable file
View file

@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
lcov_path="${1:-}"
if [[ -z "${lcov_path}" || ! -f "${lcov_path}" ]]; then
echo "usage: $0 <path/to/file.lcov>" >&2
exit 2
fi
# lcov format includes per-file LF (lines found) and LH (lines hit). Sum those.
awk '
/^LF:/ { lf += substr($0, 4) }
/^LH:/ { lh += substr($0, 4) }
END {
if (lf == 0) {
printf("lines: 0/0 (0.00%%)\n")
exit 0
}
pct = (lh * 100.0) / lf
printf("lines: %d/%d (%.2f%%)\n", lh, lf, pct)
}
' "${lcov_path}"