From 085aa6093b912303b669e7bd6d2d05e747458795 Mon Sep 17 00:00:00 2001 From: vrana Date: Wed, 4 Jan 2012 15:22:17 -0800 Subject: [PATCH] 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 --- src/workflow/cover/ArcanistCoverWorkflow.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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) { -- 2.43.0