aboutsummaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-23 01:11:54 -0500
committerCraig Jennings <c@cjennings.net>2026-04-23 01:11:54 -0500
commit8f23a188653ce6c699d0e1e0977cd98ee511dd02 (patch)
tree80e44018bb7e937505e4e699ab858a103b4bbfe3 /init.el
parentadd0011f688e63b30a6ca2d9f7cc06899c165ed5 (diff)
downloaddotemacs-8f23a188653ce6c699d0e1e0977cd98ee511dd02.tar.gz
dotemacs-8f23a188653ce6c699d0e1e0977cd98ee511dd02.zip
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.
Diffstat (limited to 'init.el')
-rw-r--r--init.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/init.el b/init.el
index 4f5a3aa1a..d13f3378a 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 -----------------------