From: vrana Date: Wed, 4 Jan 2012 23:22:17 +0000 (-0800) Subject: Ignore non-plaintext changes in cover X-Git-Tag: conduit-4~200 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=085aa6093b912303b669e7bd6d2d05e747458795;p=arcanist.git Ignore non-plaintext changes in cover Test Plan: Run ##arc lint## after changing a binary file "Warning: Invalid argument supplied for foreach() in src/workflow/cover/ArcanistCoverWorkflow.php on line 88" should not be displayed Reviewers: epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1314 --- diff --git a/src/workflow/cover/ArcanistCoverWorkflow.php b/src/workflow/cover/ArcanistCoverWorkflow.php index 639c7921..44d5792f 100644 --- a/src/workflow/cover/ArcanistCoverWorkflow.php +++ b/src/workflow/cover/ArcanistCoverWorkflow.php @@ -1,7 +1,7 @@ getChangedLines($path, 'cover'); - } - $covers = array(); foreach ($paths as $path) { + $lines = $this->getChangedLines($path, 'cover'); + if (!$lines) { + continue; + } $blame = $repository_api->getBlame($path); - $lines = $changed[$path]; foreach ($lines as $line) { list($author, $revision) = idx($blame, $line, array(null, null)); if (!$author) {