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
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/cover: Allow specifying uncovered lines #12504
In this reddit discussion, /u/jerf has a nice suggestion: label lines that should be impossible to reach to improve coverage. Something like follows:
The coverage tool could then instrument the line and ignore it if there are 0 passes, and issue an error if there were more than zero.