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

Improve clarity of line and branch coverage format. #125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joshuapinter
Copy link

@joshuapinter joshuapinter commented Oct 30, 2023

  • Put percentage first and then covered and total counts in brackets afterwards. Percentage is most critical at a quick glance.

  • Put line and brnach coverage on separate lines.

Before

Coverage report generated for (1/10), (10/10), (2/10), (3/10), (4/10), (5/10), (6/10), (7/10), (8/10), (9/10) to /Users/me/Development/cntral/coverage. 8534 / 16083 LOC (53.06%) covered. 2225 / 4749 branches (46.85%) covered.

After

Now it shows in a clean format, including covered branches, total branches and percent of covered branches. Something like this:

Coverage report generated for (1/10), (10/10), (2/10), (3/10), (4/10), (5/10), (6/10), (7/10), (8/10), (9/10) to /Users/me/Development/cntral/coverage.
Line Coverage: 53.06% (8534 / 16083)
Branch Coverage: 46.85% (2225 / 4749)

When branch coverage is not enabled it simply omits that line, so it appears like this:

Coverage report generated for (1/10), (10/10), (2/10), (3/10), (4/10), (5/10), (6/10), (7/10), (8/10), (9/10) to /Users/me/Development/cntral/coverage.
Line Coverage: 53.06% (8534 / 16083)

- Put percentage first and then covered and total counts in brackets afterwards. Percentage is most critical at a quick glance.

- Put line and brnach coverage on separate lines.

Now it shows in a clean format, including covered branches, total branches and percent of covered branches. Something like this:

```
Coverage report generated for (1/10), (10/10), (2/10), (3/10), (4/10), (5/10), (6/10), (7/10), (8/10), (9/10) to /Users/me/Development/cntral/coverage.
Line Coverage: 58.44% (7554 / 12927)
Branch Coverage: 50.43% (1868 / 3704)
```

When branch coverage is not enabled it simply omits that line, so it appears like this:

```
Coverage report generated for (1/10), (10/10), (2/10), (3/10), (4/10), (5/10), (6/10), (7/10), (8/10), (9/10) to /Users/me/Development/cntral/coverage.
Line Coverage: 58.44% (7554 / 12927)
```
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.

None yet

1 participant