diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-25 15:11:59 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-25 15:11:59 -0500 |
| commit | 886399328b5f263faf158bf3acf4303c2f4466ff (patch) | |
| tree | 4e924770e1dd635ac151510bcba35c51209a054a | |
| parent | a5b955f7c74ad5e27bb73c6d2143359cc66b2455 (diff) | |
| download | rulesets-886399328b5f263faf158bf3acf4303c2f4466ff.tar.gz rulesets-886399328b5f263faf158bf3acf4303c2f4466ff.zip | |
chore(todo): add coverage-summary language-bundle task
| -rw-r--r-- | todo.org | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -1128,6 +1128,35 @@ Scope: Origin: came up while authoring =triage-intake.org= on 2026-05-11. +** TODO [#C] Templatize =make coverage-summary= into the language bundles +:PROPERTIES: +:LAST_REVIEWED: 2026-05-25 +:END: + +Borrow dotemacs's =make coverage-summary= into the language bundles. After =make coverage= writes a coverage file, =coverage-summary= prints per-unit covered/total with percentages, a unit-weighted project number, and a list of source files present on disk but missing from the coverage report. + +*The kernel — the only part worth building.* Weight the project number by file/module rather than by line, and count a source file absent from the report as 0% instead of omitting it. A module no test imports just doesn't appear in coverage.py or nyc output, so it silently fails to drag the number down. That missing-file detection is the value; everything else (per-file table, total) the built-in reporters already print, so don't reimplement those. + +*Scope Elisp-first.* Port the proven dotemacs version into the elisp bundle, prove the pattern end-to-end, then fan out. Don't open all four bundles at once. + +*Delivery (settled 2026-05-25).* Two rulesets-owned pieces per language: +- The summary *script* ships in the bundle under =.claude/= (inside the now-gitignored tooling footprint), copied in on install and auto-fixed on drift by =sync-language-bundle.sh=, never committed by the project. +- One *text file per language* holding the Makefile fragment (the =coverage-summary= target plus its =coverage= prerequisite) and a block recommending how to set up coverage for that language. The bundle never edits the project's own Makefile. + - *New project:* install copies that file in for the project to own. + - *Existing project:* sync drops the fragment into the project's =inbox/= rather than touching its Makefile — the project adopts it deliberately. + +*Prerequisite caveat.* The summary presumes a coverage harness exists (undercover, coverage.py, nyc, =go cover=). Several bundles may have no =make coverage= yet, so for those this task implies adding the harness first — or the per-language file documents it as a prereq. + +Per-language parser (the script is ~40 lines over each tool's output): +- Elisp: undercover SimpleCov JSON (=.coverage/simplecov.json=) — dotemacs/auto-dim scripts already parse this. +- Go: =go test -coverprofile=cover.out=; parse =cover.out= (simple text), or lean on =go tool cover -func=. +- Python: =coverage json= per-file JSON, or lean on =coverage report=. +- TypeScript/JS: nyc/Istanbul =coverage-final.json= / json-summary. + +Reference (dotemacs): =scripts/coverage-summary.el=, =modules/coverage-core.el=, and the =coverage= / =coverage-summary= Makefile targets. + +Origin: handoff from the .emacs.d session, 2026-05-25. + * Rulesets Resolved ** DONE [#C] Fix =cj-scan= false positives on cj fences nested inside other =#+begin_*= blocks :bug: CLOSED: [2026-05-15 Fri] |
