Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/cover: comment to ignore files for coverage #34639
For some classifications of generated code it is a necessity to have the output file be in the same folder and package as the source go file (for instance generating methods on types in the source files).
However, this means that the generated code is counted when doing coverage. Which is sometimes undesirable since it is there but you don't test the whole thing.
I don't think the issue is worth decorating the source code. In general I discourage tools that require annotations. Sometimes (such as with go generate) they are pretty much necessary, but this request is just for an option to control a non-critical build tool, and that is below the bar.