diff --git a/src/lint/linter/base/ArcanistLinter.php b/src/lint/linter/base/ArcanistLinter.php index b704c41d..4b3bbe23 100644 --- a/src/lint/linter/base/ArcanistLinter.php +++ b/src/lint/linter/base/ArcanistLinter.php @@ -67,12 +67,17 @@ abstract class ArcanistLinter { protected function getData($path) { if (!array_key_exists($path, $this->data)) { - throw new Exception("Data is not provided for path '{$path}'!"); + $disk_path = $this->getEngine()->getFilePathOnDisk($path); + if ($disk_path) { + $this->data[$path] = Filesystem::readFile($disk_path); + } else { + throw new Exception("Data is not provided for path '{$path}'!"); + } } return $this->data[$path]; } - public function setEngine($engine) { + public function setEngine(ArcanistLintEngine $engine) { $this->engine = $engine; return $this; } diff --git a/src/lint/linter/base/__init__.php b/src/lint/linter/base/__init__.php index 4e79e23c..1b364bf5 100644 --- a/src/lint/linter/base/__init__.php +++ b/src/lint/linter/base/__init__.php @@ -5,8 +5,11 @@ */ + phutil_require_module('arcanist', 'lint/message'); phutil_require_module('arcanist', 'lint/severity'); +phutil_require_module('phutil', 'filesystem'); + phutil_require_source('ArcanistLinter.php');