'ArcanistCapabilityNotSupportedException' => 'workflow/exception/ArcanistCapabilityNotSupportedException.php',
'ArcanistCheckstyleXMLLintRenderer' => 'lint/renderer/ArcanistCheckstyleXMLLintRenderer.php',
'ArcanistChmodLinter' => 'lint/linter/ArcanistChmodLinter.php',
+ 'ArcanistChmodLinterTestCase' => 'lint/linter/__tests__/ArcanistChmodLinterTestCase.php',
'ArcanistCloseRevisionWorkflow' => 'workflow/ArcanistCloseRevisionWorkflow.php',
'ArcanistCloseWorkflow' => 'workflow/ArcanistCloseWorkflow.php',
'ArcanistClosureLinter' => 'lint/linter/ArcanistClosureLinter.php',
'ArcanistCapabilityNotSupportedException' => 'Exception',
'ArcanistCheckstyleXMLLintRenderer' => 'ArcanistLintRenderer',
'ArcanistChmodLinter' => 'ArcanistLinter',
+ 'ArcanistChmodLinterTestCase' => 'ArcanistArcanistLinterTestCase',
'ArcanistCloseRevisionWorkflow' => 'ArcanistWorkflow',
'ArcanistCloseWorkflow' => 'ArcanistWorkflow',
'ArcanistClosureLinter' => 'ArcanistExternalLinter',
}
public function lintPath($path) {
- if (is_executable($path)) {
- if ($this->getEngine()->isBinaryFile($path)) {
- $mime = Filesystem::getMimeType($path);
+ $engine = $this->getEngine();
+
+ if (is_executable($engine->getFilePathOnDisk($path))) {
+ if ($engine->isBinaryFile($path)) {
+ $mime = Filesystem::getMimeType($engine->getFilePathOnDisk($path));
switch ($mime) {
// Archives
'hook' => 'optional bool',
'config' => 'optional map<string, wild>',
'path' => 'optional string',
+ 'mode' => 'optional string',
));
$exception = null;
Filesystem::writeFile($tmp, $data);
$full_path = (string)$tmp;
+ $mode = idx($config, 'mode');
+ if ($mode) {
+ Filesystem::changePermissions($tmp, octdec($mode));
+ }
+
$dir = dirname($full_path);
$path = basename($full_path);