aboutsummaryrefslogtreecommitdiff
path: root/tests/run-coverage-file.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
commitf9cdb7a26e00fd45f254c93568ad9c7ddec094f8 (patch)
treebd84c1ddcbfe53b1d5e7fb736b66bd7084599124 /tests/run-coverage-file.el
parentb135ca3a376a82e8dbd417f70d31d8bd12fd6768 (diff)
downloaddotemacs-f9cdb7a26e00fd45f254c93568ad9c7ddec094f8.tar.gz
dotemacs-f9cdb7a26e00fd45f254c93568ad9c7ddec094f8.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 'tests/run-coverage-file.el')
0 files changed, 0 insertions, 0 deletions