]> khamidou — GitHub mirrors - arcanist.git/commit
Prevent detailed code coverage from accessing missing report.
authorJames Rhodes <jrhodes@redpointsoftware.com.au>
Fri, 20 Sep 2013 16:18:02 +0000 (09:18 -0700)
committerepriestley <git@epriestley.com>
Fri, 20 Sep 2013 16:18:02 +0000 (09:18 -0700)
commit75737c6d891d714e1f3d38e9ec7a2bf27d21d7ed
tree8d3fc9d9067f2801bea8e1071deb1054f81488ac
parentbfcb3cfcd0a567b2d1d211d8d6e6448a8779e047
Prevent detailed code coverage from accessing missing report.

Summary:
Fixes T3856.

Detailed code coverage iterates over all of the files with changes in the current repository, however the code coverage tool might not generate a report for all changed files in the repository, and this would result in an undefined index error.

As an additional bonus, since changes to binary files won't be reported by code coverage tools, this also prevents binary data from being outputted to the console.

Test Plan:
Change a binary file in a repository and run a code coverage tool.  The binary file should be reported as 0% code coverage, but the file contents should not be rendered to the console.

Change a code file that is not covered by a code coverage tool and run code coverage.  The file should be reported as 0% code coverage, and the file contents should not be displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: Korvin, aran
Maniphest Tasks: T3856

Differential Revision: https://secure.phabricator.com/D7051
src/workflow/ArcanistUnitWorkflow.php