From e0bc910dda5e969683cf74768a7a765415b1fe50 Mon Sep 17 00:00:00 2001 From: adonohue Date: Fri, 11 Feb 2011 17:48:06 -0800 Subject: [PATCH] Tweak license linter to support licenses on line immediately after getLicensePatterns(); $license = $this->getLicenseText($copyright_holder); + $data = $this->getData($path); + $matches = 0; + foreach ($patterns as $pattern) { - $data = $this->getData($path); - $matches = 0; if (preg_match($pattern, $data, $matches)) { - $expect = rtrim(implode('', array_slice($matches, 1)))."\n\n".$license; - $expect = ltrim($expect); + $expect = rtrim(implode('', array_slice($matches, 1)))."\n".$license; if (rtrim($matches[0]) != rtrim($expect)) { $this->raiseLintAtOffset( 0,