fix: show patch-specific uncovered lines in PR comment#65
Merged
MathurAditya724 merged 1 commit intomainfrom Mar 26, 2026
Merged
fix: show patch-specific uncovered lines in PR comment#65MathurAditya724 merged 1 commit intomainfrom
MathurAditya724 merged 1 commit intomainfrom
Conversation
…ject-wide counts The 'Files with missing lines' table in PR comments previously showed all uncovered lines across the entire file, which was misleading when displayed next to patch coverage percentages. Now when in PR context, the table shows only the uncovered lines within the diff (matching Codecov's official behavior). - Add partialLines tracking to PatchFileCoverage for branch coverage gaps - Thread patchFileBreakdown from PatchAnalyzer into ReportFormatter - Fall back to project-wide counts for non-PR contexts (push events)
Codecov Results 📊✅ 189 passed | Total: 189 | Pass Rate: 100% | Execution Time: 288ms 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 98.21%. Project has 757 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 55.95% 56.72% +0.77%
==========================================
Files 24 24 —
Lines 1713 1744 +31
Branches 1232 1253 +21
==========================================
+ Hits 956 987 +31
- Misses 757 757 —
- Partials 97 98 +1Generated by Codecov Action |
This was referenced Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The "Files with missing lines" table in PR comments previously showed all uncovered lines across each entire file (project-wide counts), which was misleading next to per-file patch coverage percentages. For example, a file might show "272 Missing and 112 partials" when only 1 line in the diff was actually uncovered.
Now in PR context, the table shows only the uncovered lines within the diff, matching Codecov's official comment behavior.
Before (from this comment):
bytes.rsargs.rsAfter (matching Codecov's comment):
args.rsbytes.rsProject-wide uncovered line count is still shown in the summary line ("Project has N uncovered lines.").
Changes
src/analyzers/patch-analyzer.ts: AddpartialLinestracking toPatchFileCoverage— detects lines within the diff that have partial branch coverage (count > 0 but inFileCoverage.partialLines)src/formatters/report-formatter.ts: AcceptpatchFileBreakdownin options; when available (PR context), use patch-specific missed/partial line counts and per-file patch percentages in the table. Fall back to project-wide counts for non-PR contexts (push events).src/index.ts: ThreadpatchCoverage.fileBreakdowninto the report formatter options