Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Spacetown
Copy link
Member

Do not add lines to coverage data by decision analysis.

@Spacetown Spacetown added this to the 5.2 milestone Apr 26, 2022
@Spacetown Spacetown force-pushed the fix_decision_coverage_for_excluded_lines branch from 1ba0b55 to 5575638 Compare April 28, 2022 18:50
@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #617 (3b7cf55) into master (896396d) will decrease coverage by 0.02%.
The diff coverage is 87.50%.

@@            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     
Flag Coverage Δ
ubuntu-18.04 93.77% <62.50%> (-0.15%) ⬇️
windows-2019 94.72% <87.50%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gcovr/decision_analysis.py 91.25% <87.50%> (-1.06%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Spacetown Spacetown force-pushed the fix_decision_coverage_for_excluded_lines branch from 5575638 to 724b792 Compare April 28, 2022 19:13
@Spacetown Spacetown marked this pull request as ready for review April 28, 2022 19:43
@Spacetown Spacetown requested a review from latk April 28, 2022 19:43
Copy link
Member

@latk latk left a 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
Comment on lines 193 to 197
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
Copy link
Member

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).

@Spacetown Spacetown force-pushed the fix_decision_coverage_for_excluded_lines branch from e75786d to 3b7cf55 Compare August 4, 2022 20:14
@Spacetown Spacetown merged commit b5a7f9f into gcovr:master Aug 5, 2022
@Spacetown Spacetown deleted the fix_decision_coverage_for_excluded_lines branch August 5, 2022 03:44
D-Walther pushed a commit to D-Walther/gcovr that referenced this pull request Jun 16, 2025
* Do not add coverage for excluded lines in decision analysis.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants