mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-21 22:32:41 +01:00
Blanket exclude 'externals/' directory from linting in the PhutilLintEngine.
This commit is contained in:
parent
d46a138eb0
commit
d933f20005
2 changed files with 9 additions and 7 deletions
|
@ -56,7 +56,7 @@ foreach ($files as $file => $hash) {
|
||||||
$modules[Filesystem::readablePath(dirname($file), $root)][] = $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();
|
$signatures = array();
|
||||||
foreach ($modules as $module => $hashes) {
|
foreach ($modules as $module => $hashes) {
|
||||||
|
@ -97,11 +97,6 @@ foreach ($signatures as $module => $signature) {
|
||||||
if ($futures) {
|
if ($futures) {
|
||||||
echo "Found ".count($specs)." modules in cache; ".
|
echo "Found ".count($specs)." modules in cache; ".
|
||||||
"analyzing ".count($futures)." modified modules";
|
"analyzing ".count($futures)." modified modules";
|
||||||
} else {
|
|
||||||
echo "All modules were found in cache.\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($futures) {
|
|
||||||
foreach (Futures($futures)->limit(8) as $module => $future) {
|
foreach (Futures($futures)->limit(8) as $module => $future) {
|
||||||
echo ".";
|
echo ".";
|
||||||
$specs[$module] = array(
|
$specs[$module] = array(
|
||||||
|
@ -110,6 +105,8 @@ if ($futures) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
} else {
|
||||||
|
echo "All modules were found in cache.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$class_map = array();
|
$class_map = array();
|
||||||
|
@ -186,7 +183,7 @@ Filesystem::writeFile($root.'/__phutil_library_map__.php', $map_file);
|
||||||
echo "Writing module cache...\n";
|
echo "Writing module cache...\n";
|
||||||
|
|
||||||
Filesystem::writeFile(
|
Filesystem::writeFile(
|
||||||
$root.'/.phutil_module_cache',
|
$root.'/.phutil_module_cache',
|
||||||
json_encode($specs));
|
json_encode($specs));
|
||||||
|
|
||||||
echo "Done.\n";
|
echo "Done.\n";
|
||||||
|
|
|
@ -38,6 +38,11 @@ class PhutilLintEngine extends ArcanistLintEngine {
|
||||||
if (!$this->pathExists($path)) {
|
if (!$this->pathExists($path)) {
|
||||||
unset($paths[$key]);
|
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();
|
$generated_linter = new ArcanistGeneratedLinter();
|
||||||
|
|
Loading…
Reference in a new issue