]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use ArcanistPhutilLibraryLinter, not ArcanistPhutilModuleLinter
authorepriestley <git@epriestley.com>
Thu, 31 May 2012 17:36:00 +0000 (10:36 -0700)
committerepriestley <git@epriestley.com>
Thu, 31 May 2012 17:36:00 +0000 (10:36 -0700)
Summary:
  - The library linter works fine on v1 or v2 libraries, so switch to it for all libraries.
  - "arc liberate" on v1 libraries will still invoke the Module linter, and thus generate __init__.php files.

Test Plan: Ran "arc lint". Grepped for module linter.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran
Maniphest Tasks: T1103

Differential Revision: https://secure.phabricator.com/D2620

src/lint/engine/comprehensive/ComprehensiveLintEngine.php
src/lint/engine/phutil/PhutilLintEngine.php

index 6e0c0d26818f68ae4f4d57f4dd2f2c94073a20d5..2ef9466c7156f177fba090e23f709812491a79db 100644 (file)
@@ -28,17 +28,6 @@ final class ComprehensiveLintEngine extends ArcanistLintEngine {
 
     $paths = $this->getPaths();
 
-    // This needs to go first so that changes to generated files cause module
-    // linting. This linter also operates on removed files, because removing
-    // a file changes the static properties of a module.
-    $module_linter = new ArcanistPhutilModuleLinter();
-    $linters[] = $module_linter;
-    foreach ($paths as $path) {
-      $module_linter->addPath($path);
-    }
-
-    // Remaining lint engines operate on file contents and ignore removed
-    // files.
     foreach ($paths as $key => $path) {
       if (!$this->pathExists($path)) {
         unset($paths[$key]);
index 881ec99fc6d4dc232f8c5c899f6331ace58b213a..34c31ea9611f393e54ec69332dbcd52489c89f70 100644 (file)
@@ -30,17 +30,13 @@ class PhutilLintEngine extends ArcanistLintEngine {
 
     $paths = $this->getPaths();
 
-    // This needs to go first so that changes to generated files cause module
-    // linting. This linter also operates on removed files, because removing
-    // a file changes the static properties of a module.
-    $module_linter = new ArcanistPhutilModuleLinter();
-    $linters[] = $module_linter;
+    $library_linter = new ArcanistPhutilLibraryLinter();
+    $linters[] = $library_linter;
     foreach ($paths as $path) {
-      $module_linter->addPath($path);
+      $library_linter->addPath($path);
     }
 
-    // Remaining lint engines operate on file contents and ignore removed
-    // files.
+    // Remaining linters operate on file contents and ignore removed files.
     foreach ($paths as $key => $path) {
       if (!$this->pathExists($path)) {
         unset($paths[$key]);