]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Load more context for lint only if the files actually exist.
authorepriestley <epriestley@phabricator.com>
Mon, 11 Apr 2011 21:53:48 +0000 (14:53 -0700)
committerepriestley <epriestley@phabricator.com>
Mon, 11 Apr 2011 21:54:17 +0000 (14:54 -0700)
src/lint/engine/base/ArcanistLintEngine.php

index 053b72aace665394a1d548790393133d9c98a1cc..35b4fe2a59cfc7d5c829aedfc4903f29895a98d3 100644 (file)
@@ -176,7 +176,7 @@ abstract class ArcanistLintEngine {
       $result->setFilePathOnDisk($disk_path);
       if (isset($this->fileData[$path])) {
         $result->setData($this->fileData[$path]);
-      } else if ($disk_path) {
+      } else if ($disk_path && Filesystem::pathExists($disk_path)) {
         // TODO: this may cause us to, e.g., load a large binary when we only
         // raised an error about its filename. We could refine this by looking
         // through the lint messages and doing this load only if any of them