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

Include -coverpkg=./... by default #25

Open
cdennison opened this issue Dec 2, 2017 · 2 comments
Open

Include -coverpkg=./... by default #25

cdennison opened this issue Dec 2, 2017 · 2 comments

Comments

@cdennison
Copy link

I tried using this tool to get a coverage report similar to goveralls but the lack of the "--coverpkg"
arg caused it to give a much different result. You can see goveralls is using --coverpkg here:
https://github.com/mattn/goveralls/blob/master/goveralls.go#L124

I suggest that you make this the command because I would guess that most people seeking multi-package coverage have package that depend on each other and this is what they want. Otherwise the results are confusing because it says you have no coverage when you really do.
go test -covermode=count -coverprofile=profile.coverprofile -coverpkg=./...

@deankarn deankarn self-assigned this Dec 12, 2017
@deankarn
Copy link
Contributor

Hey @cdennison an interesting perspective, I've always looked at coverage at the repository/project level and not the entire program, mainly because many packages that you use, you can't control the test coverage.

I am definitely open to adding support though, my time is just extremely limited right now though. I will try to add, but any help anyone can provide would be great! 👍

@cdennison
Copy link
Author

@joeybloggs - looks like you recently added support for arbitrary flags so I just updated the README in PR #27 for how to do this if you need it.

deankarn added a commit that referenced this issue Dec 19, 2017
Coverpkg doc (Issue #25) plus other helpful info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants