]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Blanket exclude 'externals/' directory from linting in the PhutilLintEngine.
authorepriestley <epriestley@phabricator.com>
Wed, 26 Jan 2011 17:58:16 +0000 (09:58 -0800)
committerepriestley <epriestley@phabricator.com>
Wed, 26 Jan 2011 17:58:16 +0000 (09:58 -0800)
scripts/phutil_mapper.php
src/lint/engine/phutil/PhutilLintEngine.php

index 8dc99436b781720ee2091bbd569364dcd783ef55..7edf1133f8aacb17a9f3900ae643ee5fc7e4ee29 100755 (executable)
@@ -56,7 +56,7 @@ foreach ($files as $file => $hash) {
   $modules[Filesystem::readablePath(dirname($file), $root)][] = $hash;
 }
 
-echo "Found ".count($files)." in ".count($modules)." modules.\n";
+echo "Found ".count($files)." files in ".count($modules)." modules.\n";
 
 $signatures = array();
 foreach ($modules as $module => $hashes) {
@@ -97,11 +97,6 @@ foreach ($signatures as $module => $signature) {
 if ($futures) {
   echo "Found ".count($specs)." modules in cache; ".
        "analyzing ".count($futures)." modified modules";
-} else {
-  echo "All modules were found in cache.\n";
-}
-
-if ($futures) {
   foreach (Futures($futures)->limit(8) as $module => $future) {
     echo ".";
     $specs[$module] = array(
@@ -110,6 +105,8 @@ if ($futures) {
     );
   }
   echo "\n";
+} else {
+  echo "All modules were found in cache.\n";
 }
 
 $class_map = array();
@@ -186,7 +183,7 @@ Filesystem::writeFile($root.'/__phutil_library_map__.php', $map_file);
 echo "Writing module cache...\n";
 
 Filesystem::writeFile(
-  $root.'/.phutil_module_cache', 
+  $root.'/.phutil_module_cache',
   json_encode($specs));
 
 echo "Done.\n";
index e345c8f5ace4f40d6eeadfe342d9e495f528ccdb..6d16e4ebf04a85bba72a52a220f40f8f443206d3 100644 (file)
@@ -38,6 +38,11 @@ class PhutilLintEngine extends ArcanistLintEngine {
       if (!$this->pathExists($path)) {
         unset($paths[$key]);
       }
+      if (preg_match('@^externals/@', $path)) {
+        // Third-party stuff lives in /externals/; don't run lint engines
+        // against it.
+        unset($paths[$key]);
+      }
     }
 
     $generated_linter = new ArcanistGeneratedLinter();