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 total coverage #1604

Merged
merged 2 commits into from
Aug 15, 2017
Merged

Fix total coverage #1604

merged 2 commits into from
Aug 15, 2017

Conversation

vitorenesduarte
Copy link
Contributor

@vitorenesduarte vitorenesduarte commented Aug 10, 2017

Hey,

Given module a with 1 line, and module b with 99 lines

Currently

  |------------------------|------------|
  |                module  |  coverage  |
  |------------------------|------------|
  |                     a  |        0%  |
  |                     b  |      100%  |
  |------------------------|------------|
  |                 total  |       50%  |
  |------------------------|------------|

Expected

  |------------------------|------------|
  |                module  |  coverage  |
  |------------------------|------------|
  |                     a  |        0%  |
  |                     b  |      100%  |
  |------------------------|------------|
  |                 total  |       99%  |
  |------------------------|------------|

@ferd ferd requested a review from talentdeficit August 10, 2017 14:32
@ferd
Copy link
Collaborator

ferd commented Aug 10, 2017

Seems reasonable to me, should merge if it passes tests. Will ask @talentdeficit to review since he wrote the original stuff there I believe.

@vitorenesduarte
Copy link
Contributor Author

@ferd I just noticed something else.
When calculating the coverage percentage, modules with 0 lines will be reported with 0% instead of 100%.
Should I incorporate that in this PR as well?

@ferd
Copy link
Collaborator

ferd commented Aug 10, 2017

Yeah I think that would make sense. It's not that there's 0 lines covered, but that there's 0 lines not being covered.

@vitorenesduarte
Copy link
Contributor Author

Yes. In this case, it was specific to modules with 0 lines to be covered.

@talentdeficit talentdeficit merged commit 5e9fc7f into erlang:master Aug 15, 2017
@vitorenesduarte vitorenesduarte deleted the total_coverage branch August 15, 2017 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants