Changeset View
Changeset View
Standalone View
Standalone View
src/lint/engine/ArcanistLintEngine.php
| Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | abstract class ArcanistLintEngine { | ||||
| } | } | ||||
| final public function loadData($path) { | final public function loadData($path) { | ||||
| if (!isset($this->fileData[$path])) { | if (!isset($this->fileData[$path])) { | ||||
| if ($this->getCommitHookMode()) { | if ($this->getCommitHookMode()) { | ||||
| $this->fileData[$path] = $this->getHookAPI() | $this->fileData[$path] = $this->getHookAPI() | ||||
| ->getCurrentFileData($path); | ->getCurrentFileData($path); | ||||
| } else { | } else { | ||||
| $disk_path = $this->getFilePathOnDisk($path); | $disk_path = $this->getFilePathOnDisk($path); | ||||
| $this->fileData[$path] = Filesystem::readFile($disk_path); | $this->fileData[$path] = Filesystem::readFile($disk_path); | ||||
| } | } | ||||
| } | } | ||||
| return $this->fileData[$path]; | return $this->fileData[$path]; | ||||
| } | } | ||||
| public function pathExists($path) { | public function pathExists($path) { | ||||
| if ($this->getCommitHookMode()) { | if ($this->getCommitHookMode()) { | ||||
| $file_data = $this->loadData($path); | $file_data = $this->loadData($path); | ||||
| ▲ Show 20 Lines • Show All 498 Lines • Show Last 20 Lines | |||||