From fe142a8d9268c36b6b8fd363e60cb587dded1602 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 23 Apr 2026 01:11:54 -0500 Subject: feat(coverage): add cj/coverage-report command and F7 binding Completes the coverage v1 user-facing path. cj/coverage-report is the interactive entry point: 1. Resolves the backend for the current project (honoring cj/coverage-backend from .dir-locals.el). 2. Prompts for a git-diff scope via completing-read (Working tree, Staged, Branch vs parent, Branch vs main). 3. Reads the cached simplecov report, intersects with the diff, renders records into a *Coverage Report* buffer. 4. If the report doesn't exist, prompts to run coverage first. With a prefix argument, re-runs regardless. The report buffer uses cj/coverage-report-mode, a compilation-mode derivative. Uncovered-line entries are formatted as path:line: uncovered so the standard gnu compilation-error-regexp-alist picks them up for next-error navigation. That means M-g n, M-g p, and C-x backtick walk through uncovered lines from any buffer without switching focus. F7 is bound to the command globally, matching the F-key layout ticket's design (F4 compile+run, F5 debug, F6 test, F7 coverage). Added to init.el: (require 'coverage-core) + (require 'coverage-elisp). Tests cover the pure scope-label helpers (label to symbol, symbol to label, roundtrip) plus a smoke test that exercises the full command with stubbed backend, stubbed completing-read, stubbed shell-command-to-string, and a prepared simplecov fixture. Coverage v1 is now functionally complete: make coverage produces the report, F7 drives the interactive flow. --- init.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index 4f5a3aa1..d13f3378 100644 --- a/init.el +++ b/init.el @@ -48,6 +48,8 @@ (require 'text-config) ;; text settings and functionality (require 'undead-buffers) ;; bury rather than kill buffers you choose (require 'browser-config) ;; browser configuration/integration +(require 'coverage-core) ;; diff-aware coverage engine + F7 binding +(require 'coverage-elisp) ;; elisp backend for coverage-core ;; ------------------------ User Interface Configuration ----------------------- -- cgit v1.2.3