-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/cover: support branch coverage #28888
Comments
@ianthehat, do you know who owns |
Previous issues have been handled by @robpike . |
Not sure, you could make an argument for compiler, tools or open source teams owning that one. |
It was a consequence of the design, not deliberate and not accidental. I think it's fine and would prefer to leave things as they are. The simplicity of the current implementation is worth a lot. |
Thank you for sharing your views. I agree that the current code is really simple to read and understand (although it's of course a difficult topic), which makes a really good starting point for third-party products to implement the branch coverage. |
I see the argument for not doing it, but I've wanted this in the past. Perhaps a more powerful coverage tool could exist in the x/tools repository. |
Wouldn't the instrumentation pass need to run after the compiler has linearized the expressions? I don't see how that could be a standalone tool. |
@mvdan, @dgryski I have extended junhwi/gobco in a pull request so that it does everything I want for now. |
As of Go version 1.11, the
cover
tool only supports statement coverage, but not branch coverage.It would be nice if branch coverage would be supported, too.
The current documentation of the cover source code doesn't mention whether it was an intentional decision to support only statement coverage or whether it was omitted because of low priority.
See this Stack Overflow question.
The text was updated successfully, but these errors were encountered: