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

What do the delta figures mean? #83

Closed
JoseAlcerreca opened this issue Mar 27, 2024 · 2 comments · Fixed by #129
Closed

What do the delta figures mean? #83

JoseAlcerreca opened this issue Mar 27, 2024 · 2 comments · Fixed by #129
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@JoseAlcerreca
Copy link

Thanks for this action, we're trying it out in android/nowinandroid.

image

What do the the deltas mean? E.g. -0.13%? It looks like a comparison with the base branch, which would be nice, but I think that's impossible.

I've spent 10 minutes trying to fint the answer, so I think the README should explain it.

@sheepkacper
Copy link

Here is the part of the code that calculates it:

image

and this is the actual method:

image

@thsaravana thsaravana self-assigned this Aug 31, 2024
@thsaravana thsaravana added this to the 1.7.1 milestone Aug 31, 2024
@thsaravana thsaravana added the documentation Improvements or additions to documentation label Aug 31, 2024
@thsaravana
Copy link
Member

Yes, I will add this to the README.md

You are right, the delta is not calculated based on the base branch (which is sadly not possible). Instead, it does the next closest thing.

Let's say you add or modify 10 lines of code in a file. If you have also added unit tests, that covers 8 lines out of those 10 lines, i.e, 2 lines are not covered by any tests, then the delta would be -20%. So the delta essentially gives you visibility on how many newly added/modified lines are not covered by unit tests.

This does have it's own limitations. For instance, the delta can never be positive, i.e, if you raise a PR with more Unit Tests adding coverage to exiting code (non modified one), those won't be considered in calculating the delta, as there is no way to figure that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants