mulligan

command module
v0.0.0-...-92b8193 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2023 License: MIT Imports: 10 Imported by: 0

README

mulligan

When you have a block of code that you don't intend to cover by unit tests, you can settle for the recurring reminder of imperfect test coverage, or you can bend the rules a to your will and call a Mulligan.

In particular, you can put a comment containing the magic string "coverage:ignore" inside the offending block.

The mulligan program reads a standard go coverage profile file and (optionally) writes a revised version back to a new cover profile. To produce the revised coverage file, the program examines all source code blocks with zero coverage to see if any of these blocks contain "coverage:ignore". For those matching blocks, the revised coverage file changes the coverage count from 0 to 255..

The resulting modified coverage file can then be fed to your favorite coverage display tool and voilà, your explicitly ignored blocks will report as if they were covered.

The mulligan program also prints the remaining list of uncovered blocks to the terminal in a way that makes it easy to navigate directly to them in an IDE.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL