goverage
goverage copied to clipboard
Support for build tags
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.
A very useful feature for me too.
With go1.10 this tool is not needed anymore.
With how we've structured our tests, we still have need for this tool, and would love to see the -tags option merged from https://github.com/haya14busa/goverage/pull/18.
Our test setup:
packageAis tested frompackageA_test- We have multiple packages and want coverage from
packageB_testto count even if it inadvertently usespackageA.
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:

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.