Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/__tests__/ArcanistLinterTestCase.php
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | private function lintFile($file, ArcanistLinter $linter) { | ||||
$exception = null; | $exception = null; | ||||
$after_lint = null; | $after_lint = null; | ||||
$messages = null; | $messages = null; | ||||
$exception_message = false; | $exception_message = false; | ||||
$caught_exception = false; | $caught_exception = false; | ||||
try { | try { | ||||
$tmp = new TempFile($basename); | $mode = idx($config, 'mode', '0644'); | ||||
Filesystem::writeFile($tmp, $data); | $mode = octdec($mode); | ||||
$full_path = (string)$tmp; | |||||
$mode = idx($config, 'mode', 0644); | |||||
if ($mode) { | |||||
Filesystem::changePermissions($tmp, octdec($mode)); | |||||
} | |||||
$path_name = idx($config, 'path', $basename); | $path_name = idx($config, 'path', $basename); | ||||
$path = id(new ArcanistWorkingCopyPath()) | $path = id(new ArcanistWorkingCopyPath()) | ||||
->setPath($path_name) | ->setPath($path_name) | ||||
->setMode($mode) | ->setMode($mode) | ||||
->setData($data); | ->setData($data); | ||||
▲ Show 20 Lines • Show All 143 Lines • Show Last 20 Lines |