dave / courtney

Courtney is a coverage tool for Go
MIT License
168 stars 27 forks source link

Feature: % of code coverage #8

Closed damianoneill closed 6 years ago

damianoneill commented 6 years ago

Hi Dave, thanks for Courtney.

Quick question, is it possible to specify a % of code against the enforce command? I'd like to use this option in an automated build, but I dont want to enforce 100% coverage.

dave commented 6 years ago

The problem with enforcing a percentage is that a change might add code coverage to one part but unintentionally remove it from another part, leaving the overall percentage the same.

The idea of this tool is that you can mark any sections you don't need to test with the // notest annotation, and make sure the rest is covered.

dave commented 6 years ago

I'm sure there's plenty of CI tools out there that can fail a build on a code coverage percentage, and courtney is just a pre-processor, so you can plug it's output into another tool...