Skip to content
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 HTML output when writing to stdout #223

Merged
merged 2 commits into from Feb 18, 2018
Merged

Fix HTML output when writing to stdout #223

merged 2 commits into from Feb 18, 2018

Conversation

@mayeut
Copy link
Contributor

@mayeut mayeut commented Feb 17, 2018

This also adds tests using stdout output

@codecov
Copy link

@codecov codecov bot commented Feb 17, 2018

Codecov Report

Merging #223 into master will increase coverage by 0.9%.
The diff coverage is 64.28%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #223     +/-   ##
=========================================
+ Coverage    80.4%   81.31%   +0.9%     
=========================================
  Files           2        2             
  Lines        1143     1145      +2     
  Branches      246      247      +1     
=========================================
+ Hits          919      931     +12     
+ Misses        153      149      -4     
+ Partials       71       65      -6
Impacted Files Coverage Δ
gcovr/__main__.py 79.32% <64.28%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9c2677...99db4b6. Read the comment docs.

if not details:
cdata._sourcefile = None
else:
ttmp = os.path.abspath(options.output).split('.')
Copy link
Member

@latk latk Feb 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What specifically does this if/else fix? Can you explain, ideally by adding a comment to the code? My guess: when options.output is None, the detail file name calculation breaks. The result is also unneeded unless --html-details are requested. The cdata._sourcefile field is only assigned so that it can be read later when calling html_row() which does not use that value. Did I get this right?

Copy link
Contributor Author

@mayeut mayeut Feb 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got all that right.

latk
latk approved these changes Feb 18, 2018
@latk latk merged commit 16a282d into gcovr:master Feb 18, 2018
3 of 4 checks passed
@mayeut mayeut deleted the stdout branch Feb 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants