gotwarlost/istanbul — pull request #268 by ryan-roemer (2014-10-23 18:21:03+00:00)
Title: Add per-file / config-based coverage enforcement.

This PR implements https://github.com/gotwarlost/istanbul/issues/30 and is based on the good work from @BryanDonovan in closed PR https://github.com/gotwarlost/istanbul/pull/91 with the following items:

* Adds a `check` config parameter with `check.global` for existing command line coverage checking flags.
* Adds `check.each` for per-file coverage (only from config file).
* Adds `excludes` for an array of files (relative to root) to exclude from coverage enforcement for `global` and `each`.
* Fixes Travis CI for Node `v0.8.x`. (It was bugging me along the way).
* Updates help strings to reflect changes.
* Adds unit tests for mixed global command line / config settings and per-file config settings.

Stuff that is not in this PR / for the future:

* Pattern matching configuration params like `patterns-global` and `patterns-each` per my original comment in https://github.com/gotwarlost/istanbul/issues/30#issuecomment-58766089

I hope this is close enough to what we're looking for to give us a path forward with enough flexibility to get everyone on board. I'm happy to tweak this PR if anyone has any specific concerns.

This is a different approach than existing open PR https://github.com/gotwarlost/istanbul/pull/241, which instead adds a new `check-cover-*` command from scratch.

/cc @gotwarlost @geekdave