Permalink
Browse files

Update test/coverage-checker

Added proper attribution.
  • Loading branch information...
1 parent db964a1 commit 22b77bed1b02cc1339275b5ba0b6dd7543705c23 @EvanDotPro committed Dec 6, 2012
Showing with 27 additions and 2 deletions.
  1. +27 −2 test/coverage-checker
View
@@ -1,7 +1,32 @@
#!/usr/bin/env php
<?php
-// Source https://github.com/RWOverdijk/AssetManager/blob/master/coverage-checker.php
-// Modified for colorized output by Evan
+/*
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software consists of voluntary contributions made by many individuals
+ * and is licensed under the MIT license.
+ */
+
+/**
+ * Code coverage checker. Analyzes a given `clover.xml` report produced
+ * by PHPUnit and checks if coverage fits expected ratio
+ *
+ * Usage:
+ * php coverage-checker <path-to-clover> <pass-percentage>
+ *
+ * @author Marco Pivetta <ocramius@gmail.com>
+ * Modified for colorized output by Evan Coury <me@evancoury.com>
+ */
$inputFile = $argv[1];
$percentage = min(100, max(0, (int) $argv[2]));

0 comments on commit 22b77be

Please sign in to comment.