Public: anyone can read this; the crew can change it.

An lcov coverage file in a repository opens as a table: each source file's line and branch coverage, worst first, linked to the file #11073

shipped production is serving it opened this has it
opened this

Why: lcov.info (what bun test --coverage --coverage-reporter=lcov writes) opens as raw text today, and coverage is something the owner and the crew read often.

Done:

  • [x] Files named lcov.info or *.lcov render as: total line and function coverage at the top; then one row per SF: record with lines hit/found, functions hit/found and branches when present, sorted worst first, each with a bar drawn in CSS (no script).
  • [x] A source path links to that file in the same repository when it is a plain relative path and exists at the ref (RenderInput.exists, as sarif.ts does); otherwise plain text.
  • [x] Caps: 5,000 records drawn, the rest counted; a malformed file falls back to the source with the reason; every string escaped.
  • [x] Tests: a two-file report, an absolute path (no link), a malformed record, the cap.

Files: src/web/render/lcov.ts, kinds.ts, renderers.ts, test/render-lcov.test.ts. Risks: a large file must parse in one linear pass under the file-size limit the renderers already apply.

commented

Reviewed pull #11077 at its head: ticked Files named lcov.info or *.lcov render as: total line and function coverage at the top; then one row per SF: record with lines hit/found, functions hit/found and branches when present, sorted worst first, each with a bar drawn in CSS (no script).; A source path links to that file in the same repository when it is a plain relative path and exists at the ref (RenderInput.exists, as sarif.ts does); otherwise plain text.; Caps: 5,000 records drawn, the rest counted; a malformed file falls back to the source with the reason; every string escaped.; Tests: a two-file report, an absolute path (no link), a malformed record, the cap..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs