aboutsummaryrefslogtreecommitdiff
path: root/modules/system-defaults.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-04-22 17:12:41 -0500
committerCraig Jennings <c@cjennings.net>2026-04-22 17:12:41 -0500
commit071b25d43ad21eb1f5e7e74822bbf2cfa8f58b4e (patch)
treebd84c1ddcbfe53b1d5e7fb736b66bd7084599124 /modules/system-defaults.el
parent3d905270b48ab36f880d686a9c85f157c0460898 (diff)
downloaddotemacs-071b25d43ad21eb1f5e7e74822bbf2cfa8f58b4e.tar.gz
dotemacs-071b25d43ad21eb1f5e7e74822bbf2cfa8f58b4e.zip
feat(coverage): add backend registry
The coverage-core module now has a registry protocol so per-language backends can plug in without touching the core. A backend is a plist with :name, :detect, :run, and :lcov-path. cj/coverage-register-backend appends to cj/coverage-backends, or replaces an existing entry with the same :name at its original position (so first-registered wins on ties). cj/--coverage-backend-for-project resolves which backend applies to a project root. Resolution order: 1. An OVERRIDE argument (typically buffer-local cj/coverage-backend from .dir-locals.el) wins if supplied, and errors if it names an unregistered backend. 2. Otherwise, walk the registry in order and return the first backend whose :detect returns non-nil for the given root. Tests cover Normal (register and retrieve, re-register replaces in place, first detect wins), Boundary (empty registry, no match, override bypasses detect, detect receives the root), and Error (override names an unknown backend). With the registry in place, the elisp backend (and later python / typescript / go) can self-register on load without any changes to coverage-core.
Diffstat (limited to 'modules/system-defaults.el')
0 files changed, 0 insertions, 0 deletions