Page MenuHomePhabricator

D9026.id21439.diff
No OneTemporary

D9026.id21439.diff

diff --git a/src/lint/linter/ArcanistExternalLinter.php b/src/lint/linter/ArcanistExternalLinter.php
--- a/src/lint/linter/ArcanistExternalLinter.php
+++ b/src/lint/linter/ArcanistExternalLinter.php
@@ -385,6 +385,14 @@
return null;
}
+ protected function buildFuture($bin, $file, $from_stdin = false) {
+ if ($from_stdin) {
+ return new ExecFuture('%C %C', $bin, $file);
+ } else {
+ return new ExecFuture('%C %s', $bin, $file);
+ }
+ }
+
protected function buildFutures(array $paths) {
$executable = $this->getExecutableCommand();
@@ -393,15 +401,13 @@
$futures = array();
foreach ($paths as $path) {
if ($this->supportsReadDataFromStdin()) {
- $future = new ExecFuture(
- '%C %C',
- $bin,
- $this->getReadDataFromStdinFilename());
+ $future = $this->buildFuture(
+ $bin, $this->getReadDataFromStdinFilename(), true);
$future->write($this->getEngine()->loadData($path));
} else {
// TODO: In commit hook mode, we need to do more handling here.
$disk_path = $this->getEngine()->getFilePathOnDisk($path);
- $future = new ExecFuture('%C %s', $bin, $disk_path);
+ $future = $this->buildFuture($bin, $disk_path);
}
$futures[$path] = $future;

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 7:52 AM (6 d, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7699293
Default Alt Text
D9026.id21439.diff (1 KB)

Event Timeline