function postCommit($msg, $files, $actions) {
return true;
}
- function checkBlanks($filename, $fp)
- {
- $pipes = null;
- $contents = stream_get_contents($fp);
- $lines = explode("\n",$contents);
- $seq = 0;
- $total = 0;
- foreach($lines as $l) {
- if (strlen(trim($l))) {
- $seq =0;
- continue;
- }
- // got blannk line
- $seq++;
- $total++;
- if ($seq > 3) {
- return "Remove all the extra blank lines from $filename before committing";
- }
- }
-
- if (($total / count($lines)) > 0.2) {
- return "More than 20% of $filename is blank lines - tidy up the file before committing";
- }
-
-
- return true;
- }
+
}
\ No newline at end of file