Repository navigation
Handle malformed coverage files - #93
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #93 +/- ##
==========================================
+ Coverage 95.81% 96.08% +0.27%
==========================================
Files 4 4
Lines 358 383 +25
==========================================
+ Hits 343 368 +25
Misses 15 15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Julia's
.covfiles can contain an empty or partial line (#70, #92). CoverageTools currently slices the first nine characters of every line, so one damaged file aborts coverage collection, even when another process wrote a usable coverage file.This reads Julia's ASCII count field and treats malformed records as unknown counts. It keeps a slot for each bad record, so later counts stay on the right source lines and counts from another
.covfile can still be merged. It warns once per affected file. Source exclusion also handles a coverage file that ends before the source file.For example, counts of
1, an empty record, then3become[1, nothing, 3]rather than throwing or shifting3to the second line. Existing source analysis may still infer zero for an unknown line inside a function.Tested with the full suite on Julia 1.10.12 and 1.14 nightly. The new tests cover empty and truncated records, count-field boundaries, merging with a complete file, and a coverage file shorter than its source.
Fixes #70. Fixes #92.