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

Support for build tags #9

Open
JelteF opened this issue Apr 20, 2017 · 3 comments
Open

Support for build tags #9

JelteF opened this issue Apr 20, 2017 · 3 comments

Comments

@JelteF
Copy link
Contributor

JelteF commented Apr 20, 2017

Just wanted to say great tool. It merges the reports much better than the bash stuff we had before. Is it possible to add a -tags option to the command though? I use a test tag to exclude some files that don't need to be tested or covered from the tests.

@vmarkovtsev
Copy link

A very useful feature for me too.

@JelteF
Copy link
Contributor Author

JelteF commented May 14, 2018

With go1.10 this tool is not needed anymore.

@dimroc
Copy link

dimroc commented Jul 25, 2018

With how we've structured our tests, we still have need for this tool, and would love to see the -tags option merged from #18.

Our test setup:

  • packageA is tested from packageA_test
  • We have multiple packages and want coverage from packageB_test to count even if it inadvertently uses packageA.

In go1.10, if coverage is achieved from a different package, it's not counted, unless you use -coverpkg=./.... But you then have duplicate samples in your coverage.out that leads to erroneous coverage percentages from tools:

item-0_and_displaysextra_and_appleclockextra_and_item-0_and_item-0

We've tried more elaborate things like using go list -f ... alongside -coverpkg but prefer goverage. If anyone has feedback on this, it would be much appreciated.

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

No branches or pull requests

3 participants