-
Notifications
You must be signed in to change notification settings - Fork 29
[fix] Only count directly changed lines as misses when intended changes is specified #1037
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #1037 +/- ##
=======================================
Coverage 96.02% 96.02%
=======================================
Files 828 828
Lines 19463 19479 +16
=======================================
+ Hits 18689 18705 +16
Misses 774 774
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
❌ 1 Tests Failed:
View the top 1 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
✅ All tests successful. No failed tests were found. 📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
71e4890 to
e818ef2
Compare
| for line in self._lines: | ||
| base_cov = line.coverage["base"] | ||
| head_cov = line.coverage["head"] | ||
| if (line.added or line.removed) or (base_cov == head_cov): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic says if line is in the diff or coverage on the line has not changed, then it's unintended (coverage change on non-diff line) and we should filter it out. Correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct yep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just want to confirm that these indirect changes will still show in the indirect changes tab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid lgtm
Closes codecov/engineering-team#3030
We choose segments with indirectly changed lines even if a user queries for intended changes only if they have diff changes. With this PR, we will exclude those lines from each segment.