-
Notifications
You must be signed in to change notification settings - Fork 288
Fix decision coverage for excluded lines #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix decision coverage for excluded lines #617
Conversation
1ba0b55 to
5575638
Compare
Codecov Report
@@ Coverage Diff @@
## master #617 +/- ##
==========================================
- Coverage 95.11% 95.08% -0.03%
==========================================
Files 24 24
Lines 3357 3359 +2
Branches 630 631 +1
==========================================
+ Hits 3193 3194 +1
Misses 93 93
- Partials 71 72 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
5575638 to
724b792
Compare
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.
LGTM. The coverage reports look a lot more realistic now :)
Thanks for fixing this!
gcovr/merging.py
Outdated
| def get_line_coverage(target: FileCoverage, lineno: int) -> LineCoverage: | ||
| """Get the LineCoverage object for that line if available.""" | ||
| if lineno in target.lines: | ||
| return target.lines[lineno] | ||
| return None |
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.
Instead of creating this function, I'd consider target.lines.get(lineno).
e75786d to
3b7cf55
Compare
* Do not add coverage for excluded lines in decision analysis.
Do not add lines to coverage data by decision analysis.