having the ability to exclude code from being tested is a must for getting some value out of the test coverage, so I'm glad I've found this package after browsing the go issue tracker and finding multiple issues asking for this feature to be supported natively
one of the things that I like a lot about golangci-lint is the encouragement to add some additional context when suppressing a linter, feature which we're using constantly, as it's much easier to know at a glance why we're explicitly deciding that a linter is not important for a specific piece of code
when marking code as not important to be covered by test, via de notest comment, I'd also like to be able to supply some additional context, as we'll know not only what code we explicitly decided not to test, but also some context about why that decision was taken, preventing unnecessary guesswork and discussions when going through the codebase and finding chunks of code marked as excluded from the coverage
example
var CmdListDicts = cli.Command{
Name: "list",
// notest // glue code, mostly error handling and some cli sugarcoat
Action: func(ctx *cli.Context) error {
...
}
}
having the ability to exclude code from being tested is a must for getting some value out of the test coverage, so I'm glad I've found this package after browsing the go issue tracker and finding multiple issues asking for this feature to be supported natively
one of the things that I like a lot about
golangci-lint
is the encouragement to add some additional context when suppressing a linter, feature which we're using constantly, as it's much easier to know at a glance why we're explicitly deciding that a linter is not important for a specific piece of codewhen marking code as not important to be covered by test, via de
notest
comment, I'd also like to be able to supply some additional context, as we'll know not only what code we explicitly decided not to test, but also some context about why that decision was taken, preventing unnecessary guesswork and discussions when going through the codebase and finding chunks of code marked as excluded from the coverageexample