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
commitfe142a8d9268c36b6b8fd363e60cb587dded1602 (patch)
tree254b06931402efe3111992ccb0322b46e528c5e9 /init.el
parent3fa47b1a3b7dd8d3a4f00f117e6f97caf55a3c5d (diff)
downloaddotemacs-fe142a8d9268c36b6b8fd363e60cb587dded1602.tar.gz
dotemacs-fe142a8d9268c36b6b8fd363e60cb587dded1602.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 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 -----------------------