Repository navigation
fix(codecov): count only lines every driver reports for files no test loaded - #449
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
roxblnfk
force-pushed
the
fix/codecov-executable-lines-444
branch
from
November 24, 2026 07:42
16287ec to
ab4e586
Compare
… loaded Reports of several suites are merged line by line, so a line the estimate adds for an unloaded file stays uncovered once another suite loads the file and its driver does not report that line. The estimate now marks a line only where an operation starts and the line is the same for Xdebug, PCOV and turbocov on every PHP version from 8.2, leaving out lines whose opcode moves with the layout of an expression, with what is loaded at the time, with the PHP version, or with unreachable code. The last-line check for loaded files gets its own answer on bodies that fall through, so it keeps a closing brace the estimate leaves out. Refs #444. Assisted-By: Claude Opus 5.5 <[email protected]>
roxblnfk
force-pushed
the
fix/codecov-executable-lines-444
branch
from
November 24, 2026 10:54
ab4e586 to
cb24fc2
Compare
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.
🔍 What was changed
if (openers, format strings, variable arguments) no longer count.sprintfrope, constant&&/||, version-dependentif,assert()), unreachable code (afterreturn/throw/goto, exhaustiveswitch, endless loops, Xdebug's reading of?? throw), property hook bodies, promoted constructor and generator signatures.UncountedLinesasks a separate, permissive question (ExecutableLines::bodyEnds()), so the lower estimate never drops a closing brace the driver reported for a loaded file.Why?
Codecov merges flags line by line. A line the estimate adds for an unloaded file stays uncovered for good once another suite loads the file and its driver does not report that line. On cycle/database that was 213 of 395 misses.
Review notes
Checklist
--type=!bench)