-
Notifications
You must be signed in to change notification settings - Fork 23
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
Cover displays as 0% when -cover is not provided #62
Comments
I'd be happy to contribute this if you're open to contributions. |
Good catch, let's fix this! If you're up for it, contributions welcome. Otherwise I can fix this up fairly quickly. Need to improve the parsing between these 2 lines: with -cover
no -cover
|
Oh, I think it already returns a tparse/internal/app/table_summary.go Lines 101 to 111 in f7a4f5c
|
Sorry, I was too eager and can't take this now. Still loving the tool 🎉. Thank you! |
Haha, no worries. I'll fix this up today! |
Jotting this down for brevity. Previously
But, as pointed out there were not coverage statements, so let's display
Expected without coverage
Expected with coverage
|
I noticed that when I forget to include the
-cover
option on thego test
command, theCOVER
column is displayed with a0.0%
value.tparse could hide that column when go test has not provided any coverage information.
From best I can tell the go test -json output omits the coverage outputs when -cover isn't used, and explicitly states 0.0% when -cover is used but no coverage exists. So it should be possible to distinguish between these situations.
The text was updated successfully, but these errors were encountered: