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 coverage detection for go1.20 #325

Merged
merged 1 commit into from Jun 9, 2023
Merged

Fix coverage detection for go1.20 #325

merged 1 commit into from Jun 9, 2023

Conversation

dnephin
Copy link
Member

@dnephin dnephin commented Apr 13, 2023

Fix #322

In go versions 1.19 and earlier the coverage details were always on a separate line. As of go1.20 they are after a tab on the same line as the package name.

@gtramontina
Copy link

Hey there @dnephin! Thanks for the fix! Any idea fo when this can be merged?

@dnephin
Copy link
Member Author

dnephin commented May 20, 2023

This can probably be merged, but I wasn't super happy with the logic, and I was hoping too make it a bit more robust to future changes. I could do that in a future PR. Have you been able to test this change? Does it work for you?

@marco-m
Copy link

marco-m commented Jun 9, 2023

It works fine for me:

> gotestsum -- -coverprofile=bin/coverage.out ./...
∅  examples/download
∅  examples/phonex8
✓  . (365ms) (coverage: 31.5% of statements)

@dnephin dnephin merged commit 884b5c3 into main Jun 9, 2023
7 checks passed
@dnephin dnephin deleted the coverage-go1.20 branch June 9, 2023 23:17
@dnephin
Copy link
Member Author

dnephin commented Jun 9, 2023

Sounds good! I'll try to do a bit more testing on this before a release. It's merged now so it should be possible to install from the main branch at least.

@marco-m
Copy link

marco-m commented Jun 10, 2023

Thanks @dnephin !

@mitar
Copy link

mitar commented Jun 13, 2023

I can confirm main branch works for me on Go 1.20.

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.

Coverage not reported
4 participants