mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-04-01 23:18:14 +02: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
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2011 Facebook, Inc.
|
* Copyright 2012 Facebook, Inc.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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.");
|
"You're covered, you didn't change anything.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$changed = array();
|
|
||||||
foreach ($paths as $path) {
|
|
||||||
$changed[$path] = $this->getChangedLines($path, 'cover');
|
|
||||||
}
|
|
||||||
|
|
||||||
$covers = array();
|
$covers = array();
|
||||||
foreach ($paths as $path) {
|
foreach ($paths as $path) {
|
||||||
|
$lines = $this->getChangedLines($path, 'cover');
|
||||||
|
if (!$lines) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$blame = $repository_api->getBlame($path);
|
$blame = $repository_api->getBlame($path);
|
||||||
$lines = $changed[$path];
|
|
||||||
foreach ($lines as $line) {
|
foreach ($lines as $line) {
|
||||||
list($author, $revision) = idx($blame, $line, array(null, null));
|
list($author, $revision) = idx($blame, $line, array(null, null));
|
||||||
if (!$author) {
|
if (!$author) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue