Skip to content

feat(coverage): surface per-line execution hit counts#861

Merged
Chemaclass merged 1 commit into
mainfrom
feat/856-per-line-hit-counts
Jul 24, 2026
Merged

feat(coverage): surface per-line execution hit counts#861
Chemaclass merged 1 commit into
mainfrom
feat/856-per-line-hit-counts

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #856

Coverage's LCOV report already carried real per-line execution counts in its DA:<line>,<count> records, but the count value was never pinned by a test and the text report exposed none.

💡 Changes

  • New opt-in text block BASHUNIT_COVERAGE_SHOW_LINE_HITS=true (default off, gated like SHOW_UNCOVERED/SHOW_FUNCTIONS) prints a Line Hits section listing each covered line as <lineno>:<count> per file, reusing get_all_line_hits.
  • Tests pin the LCOV DA execution-count value (a thrice-hit line → DA:…,3) and the new view.
  • Docs note that per-line counts ship in LCOV and via the new flag. Default output unchanged.

The LCOV report already carried real per-line execution counts in its
DA:<line>,<count> records, but nothing pinned the count value and the text
report showed none. Add an opt-in text block, BASHUNIT_COVERAGE_SHOW_LINE_HITS
(default off, gated like SHOW_UNCOVERED/SHOW_FUNCTIONS), that lists each covered
line as <lineno>:<count> per file, reusing get_all_line_hits. Add tests pinning
the DA count value (a thrice-hit line -> DA:...,3) and the new view, plus docs.

Closes #856
@Chemaclass Chemaclass added the enhancement New feature or request label Jul 24, 2026
@Chemaclass Chemaclass self-assigned this Jul 24, 2026
@Chemaclass
Chemaclass merged commit fd1ad64 into main Jul 24, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the feat/856-per-line-hit-counts branch July 24, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant