From 914ab07da513daebd15c7bc65ac334cde5fbb769 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 26 May 2026 02:54:39 -0500 Subject: feat(coverage): print a terminal coverage summary from the SimpleCov report `make coverage` only reported the JSON's file size, so reading the real number meant opening the report by hand. I added a self-contained `scripts/coverage-summary.el` that parses the SimpleCov JSON and prints per-file covered/total lines with a percent, a line-weighted project figure, and a source-weighted figure. A tracked source missing from the report counts as 0% rather than dropping out silently, so a source that never got instrumented still shows up. A new `coverage-summary` target runs it against the last report, and `make coverage` chains it onto the tail of a local run (CI emits coveralls.json, not simplecov.json, so it's skipped there). Covered by `tests/test-pearl-coverage-summary.el`: parser hit/executable/merge-key semantics, the per-file records, and the error paths for a missing or malformed report. --- tests/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index c011359..341bfdb 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -293,7 +293,8 @@ help: @echo "Project-root targets (run from project root):" @echo " make setup - Install all deps via eask" @echo " make compile - Byte-compile pearl.el" - @echo " make coverage - Generate simplecov JSON via undercover" + @echo " make coverage - Generate simplecov JSON via undercover (+ summary)" + @echo " make coverage-summary - Print covered/total + percent from the last report" @echo "" @echo "Tagging tests as :slow:" @echo " (ert-deftest test-foo () :tags '(:slow) ...) — excluded by default" -- cgit v1.2.3