Skip to content

feat: per-module detail in the coverage comment#141

Merged
yonatankarp merged 1 commit into
mainfrom
feat/richer-coverage-detail
Jun 20, 2026
Merged

feat: per-module detail in the coverage comment#141
yonatankarp merged 1 commit into
mainfrom
feat/richer-coverage-detail

Conversation

@yonatankarp

@yonatankarp yonatankarp commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Enriches the coverage comment added in #140. Instead of a single Lines/Branches table, each module now gets its own section with all five JaCoCo counters (Line, Branch, Instruction, Method, Class) plus covered/missed counts — matching the richer per-module format used by hand-rolled pipelines (e.g. agent-desk). The overall Total line is kept.

Still JaCoCo/Kover-agnostic, still no-op when no reports match, still gated to same-repo PRs. Verified locally against a real multi-module set (beat-the-machine domain/application/adapters).

Note: per-module artifact links (as agent-desk has) aren't included — the shared workflow uploads a single combined JaCoCo HTML bundle rather than per-module artifacts, so generic per-module links don't map cleanly. Can be a follow-up if wanted.

Summary by CodeRabbit

  • Chores
    • Enhanced pull request coverage reporting to display per-file metric sections with coverage percentages and detailed covered/missed counts across Lines, Branches, Instructions, Methods, and Class coverage metrics.

Replace the terse Lines/Branches-only table with a section per module that
lists all five JaCoCo counters (Line, Branch, Instruction, Method, Class) with
covered/missed counts, matching the richer report format used by hand-rolled
pipelines. The overall total line is kept for an at-a-glance summary.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 20, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fc390c6f-f53c-4d84-a13f-d27ed1ad32d8

📥 Commits

Reviewing files that changed from the base of the PR and between c765288 and 4308ba2.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The CI workflow's inline Python coverage-comment script is updated to produce per-file Markdown sections with a multi-metric table (LINE, BRANCH, INSTRUCTION, METHOD, CLASS), each showing coverage percentage plus covered/missed counts. The final Markdown body assembly is updated to embed these sections instead of the previous compact rows table.

Changes

Coverage Comment Enrichment

Layer / File(s) Summary
Per-file multi-metric section generation and Markdown assembly
.github/workflows/ci.yml
Replaces rows-based per-module line/branch table with sections-based per-file Markdown blocks. For each JaCoCo XML, builds a table over ordered counter types (LINE, BRANCH, INSTRUCTION, METHOD, CLASS) with percentage and covered/missed counts; accumulates totals; inserts sections into the final Markdown output.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • yonatankarp/github-actions#140: Modifies the same JaCoCo XML parsing and Markdown PR coverage comment logic in .github/workflows/ci.yml that this PR extends with per-file multi-metric sections.

Poem

🐇 Hop hop, the coverage chart grew wide,
Five metrics now stand proudly side by side,
LINE and BRANCH and METHOD all appear,
Each file gets its own table, crystal clear.
No more plain rows — rich sections take the stage,
A rabbit checks the diff on every page! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is missing the required 'Types of changes' section with checkbox options (Bugfix/Feature/Refactoring) and incomplete 'Checklist' items that should be verified. Add the 'Types of changes' section with appropriate checkbox selection and complete the Checklist section by checking relevant boxes and verifying documentation and test requirements.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: per-module detail in the coverage comment' clearly and concisely summarizes the main change: adding per-module coverage details to the automated comment.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/richer-coverage-detail

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown

Test Results (spring-skeleton)

1 tests   1 ✅  2s ⏱️
1 suites  0 💤
1 files    0 ❌

Results for commit 4308ba2.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown

Test Results (KTOR-SKELETON)

2 tests   2 ✅  2s ⏱️
2 suites  0 💤
2 files    0 ❌

Results for commit 4308ba2.

♻️ This comment has been updated with latest results.

@yonatankarp yonatankarp marked this pull request as ready for review June 20, 2026 14:48
@yonatankarp yonatankarp merged commit b274e99 into main Jun 20, 2026
18 of 19 checks passed
@yonatankarp yonatankarp deleted the feat/richer-coverage-detail branch June 20, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant