1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-22 21:40:54 +01:00

Allow buildFutures and resolveFutures to be overridden

Summary:
I am writing a proxy linter that can be used to wrap any `ArcanistExternalLinter` and execute all commands within a Docker container (see [[https://github.com/freelancer/flarc/blob/master/src/lint/linter/ArcanistDockerContainerLinterProxy.php |`ArcanistDockerContainerLinterProxy`]] from [[https://github.com/freelancer/flarc | `flarc`]]). In order for `ArcanistDockerContainerLinterProxy` to behave like the `ArcanistExternalLinter` that is being proxied, `final` needs to be removed from some methods.

I figured this was reasonable to submit upstream as a similar change ({D19630}) was previously accepted.

Test Plan: N/A

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D19730
This commit is contained in:
Joshua Spence 2019-05-15 09:09:46 +10:00
parent fceac878f1
commit 6a8e76db32

View file

@ -410,7 +410,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
return csprintf('%s', $path);
}
final protected function buildFutures(array $paths) {
protected function buildFutures(array $paths) {
$executable = $this->getExecutableCommand();
$bin = csprintf('%C %Ls', $executable, $this->getCommandFlags());
@ -428,7 +428,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
return $futures;
}
final protected function resolveFuture($path, Future $future) {
protected function resolveFuture($path, Future $future) {
list($err, $stdout, $stderr) = $future->resolve();
if ($err && !$this->shouldExpectCommandErrors()) {
$future->resolvex();