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

Average coverage result calculated by lines #168

Open
fahmisdk6 opened this issue Jan 16, 2020 · 5 comments · May be fixed by #223
Open

Average coverage result calculated by lines #168

fahmisdk6 opened this issue Jan 16, 2020 · 5 comments · May be fixed by #223

Comments

@fahmisdk6
Copy link

Right now, if our project have multiple modules, the coverage results will be the average of all modules without counting the real lines. Example : Module A 50%, Module B 70%, the average will be 60% regardless of how big Module A compared to Module B is. While the actual coverage may be different if Module A contains more code lines than module B.

So, how can we get average coverage result that calculated by lines?

@iMacHumphries
Copy link

👍

2 similar comments
@connor-ricks
Copy link

👍

@mcanidae
Copy link

👍🏼

@TheMetalCode
Copy link

+1000

The overall coverage number should be based on line count and not a simple mean of the module-specific coverage numbers. The way it's being calculated now simply does not reflect reality and it's hard for me to ask iOS developers to make code coverage increase goals based on that number.

As a real extreme example, I have a project where we just added new frameworks where the coverage is 0. Because...there's no code to cover. So in our overall coverage report, the 0's dropped our overall number by ~35%...which is of course not real because the overall lines covered / total lines calculation didn't change at all, because the new frameworks are empty.

@soconnor-florio
Copy link

  • 1000 as well.

The issue is I might want to merge reports from different .json reports, and derive an overall coveredLines / totalLines value.

Ultimately the lack of this feature makes xcov unusable for me. Perhaps if it could generate the same json reports (with a flag) as xccov does, there would be some interoperability possible, the ability to merge reports, etc.

@FareesHussain FareesHussain linked a pull request Feb 13, 2024 that will close this issue
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 a pull request may close this issue.

6 participants