mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 10:12:41 +01:00
Don't show "not executable" for files with no coverage information
Summary: We incorrectly merge array() into empty string, which is later interpreted as "this file is entirely not-executable". Instead, show no coverage information in the UI. Test Plan: Looked at a README diff with no coverage information, got no UI render. Reviewers: tuomaspelkonen, btrahan, zeeg Reviewed By: tuomaspelkonen CC: aran, epriestley Maniphest Tasks: T965 Differential Revision: https://secure.phabricator.com/D1863
This commit is contained in:
parent
d8967290e9
commit
d8b510596f
1 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,10 @@ final class ArcanistUnitTestResult {
|
||||||
* @return string Cumulative coverage report.
|
* @return string Cumulative coverage report.
|
||||||
*/
|
*/
|
||||||
public static function mergeCoverage(array $coverage) {
|
public static function mergeCoverage(array $coverage) {
|
||||||
|
if (empty($coverage)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
$base = reset($coverage);
|
$base = reset($coverage);
|
||||||
foreach ($coverage as $more_coverage) {
|
foreach ($coverage as $more_coverage) {
|
||||||
$len = min(strlen($base), strlen($more_coverage));
|
$len = min(strlen($base), strlen($more_coverage));
|
||||||
|
|
Loading…
Reference in a new issue