mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-26 23:40:56 +01:00
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
This commit is contained in:
parent
9cdaa6dc7a
commit
085aa6093b
1 changed files with 5 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -75,15 +75,13 @@ EOTEXT
|
|||
"You're covered, you didn't change anything.");
|
||||
}
|
||||
|
||||
$changed = array();
|
||||
foreach ($paths as $path) {
|
||||
$changed[$path] = $this->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) {
|
||||
|
|
Loading…
Reference in a new issue