]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Don't unset linted paths from subdirectory and in commit hook mode
authorvrana <jakubv@fb.com>
Fri, 19 Oct 2012 19:50:38 +0000 (12:50 -0700)
committervrana <jakubv@fb.com>
Fri, 19 Oct 2012 19:57:46 +0000 (12:57 -0700)
Summary: D3737#6

Test Plan:
  phabricator/src/ $ arc lint __phutil_library_init__.php

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3746

src/lint/engine/PhutilLintEngine.php

index cf2e46cd87993d036e6bc0b7babf4a936d0d47db..e4d3518451f88d9d70209de1680f720f4050d57d 100644 (file)
@@ -52,7 +52,8 @@ class PhutilLintEngine extends ArcanistLintEngine {
     $linters[] = $name_linter;
     foreach ($paths as $key => $path) {
       $name_linter->addPath($path);
-      if (!is_file($path)) {
+      if (!$this->getCommitHookMode() &&
+          !is_file($this->getFilePathOnDisk($path))) {
         unset($paths[$key]);
       }
     }