vendredi 27 avril 2018

How to ignore Generated files from Go test coverage

I have a generated file in my package with DO NOT EDIT on top. I am running tests for my package with go test -coverprofile=cover.out <package>. This creates coverage profile and shows total coverage percentage. But it also includes generated files while calculating the coverage. Is there a way to ignore generated files in coverage calculation?

Aucun commentaire:

Enregistrer un commentaire