Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15332045
D9026.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9026.diff
View Options
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
@@ -381,6 +381,19 @@
}
}
+
+ /**
+ * Prepare the path to be added to the command string.
+ *
+ * This method is expected to return an already escaped string.
+ *
+ * @param string Path to the file being linted
+ * @return string The command-ready file argument
+ */
+ protected function getPathArgumentForLinterFuture($path) {
+ return csprintf('%s', $path);
+ }
+
protected function buildFutures(array $paths) {
$executable = $this->getExecutableCommand();
@@ -397,7 +410,8 @@
} 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);
+ $path_argument = $this->getPathArgumentForLinterFuture($disk_path);
+ $future = new ExecFuture('%C %C', $bin, $path_argument);
}
$futures[$path] = $future;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 8, 4:21 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7383208
Default Alt Text
D9026.diff (1 KB)
Attached To
Mode
D9026: Allow linters that extend `ArcanistExternalLinter` to customize the file parameter
Attached
Detach File
Event Timeline
Log In to Comment