]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Minor Arcanist fixes
authorepriestley <git@epriestley.com>
Thu, 29 Mar 2012 20:21:10 +0000 (13:21 -0700)
committerepriestley <git@epriestley.com>
Thu, 29 Mar 2012 20:21:10 +0000 (13:21 -0700)
Summary:
Addresses concerns in rARCefb8219196abf047f14b505959e54d078e1df6d3:

  - As I recall, the intent of "generateFile" was that these warnings would replace all the other warnings for that file, under the theory that if one warning caused regeneration of
the file the other warnings were irrelevant.
  - However, this code never had any effect and I haven't seen any issues with the behavior.
  - So, just remove it.

Addresses concerns in rARC070e963d1c26879e47eab19a2377e388c2f166c5:

  - Ran "arc liberate --all".

Test Plan: Ran "arc lint" after removing an "__init__.php" with and without a "fixed" generateFile block, there was no behavioral change. So I just nuked it.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D2049

src/lint/linter/phutilmodule/ArcanistPhutilModuleLinter.php
src/lint/message/ArcanistLintMessage.php
src/lint/result/ArcanistLintResult.php
src/workflow/help/__init__.php

index 71e3f785064617910be5a0e9020f321f377e5a45..730e5b2716613788d763e8313cdc0cc5b880f5b7 100644 (file)
@@ -398,10 +398,9 @@ final class ArcanistPhutilModuleLinter extends ArcanistLinter {
         $old_file,
         $new_file);
       $message->setDependentMessages($resolvable);
-      foreach ($resolvable as $message) {
-        $message->setObsolete(true);
+      foreach ($resolvable as $resolvable_message) {
+        $resolvable_message->setObsolete(true);
       }
-      $message->setGenerateFile(true);
     }
   }
 
index 7ee90a4b786ea12c11bc2f11f0be6ec7059c64d9..a5242051fc8c92359858b9a7d0b9de060b7838e2 100644 (file)
@@ -33,7 +33,6 @@ final class ArcanistLintMessage {
   protected $originalText;
   protected $replacementText;
   protected $appliedToDisk;
-  protected $generateFile;
   protected $dependentMessages = array();
   protected $obsolete;
 
@@ -149,15 +148,6 @@ final class ArcanistLintMessage {
     return ($this->getLine() !== null);
   }
 
-  public function setGenerateFile($generate_file) {
-    $this->generateFile = $generate_file;
-    return $this;
-  }
-
-  public function getGenerateFile() {
-    return $this->generateFile;
-  }
-
   public function setObsolete($obsolete) {
     $this->obsolete = $obsolete;
     return $this;
index 69fdad8bc9b93917e731fd30d8546bd9d8a902ce..61e0e2b916c6b163a3776ca59d4ca6d980ce48db 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
- * Copyright 2011 Facebook, Inc.
+ * Copyright 2012 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -87,12 +87,6 @@ final class ArcanistLintResult {
         unset($messages[$key]);
         continue;
       }
-      if ($message->getGenerateFile()) {
-        $messages = array(
-          $key => $message,
-        );
-        break;
-      }
     }
 
     $map = array();
index a9193cabfddd6d9a791b082d86f56edc0e823690..1dc0e906338212dbe9082017dc80491f907184e7 100644 (file)
@@ -10,6 +10,7 @@ phutil_require_module('arcanist', 'exception/usage');
 phutil_require_module('arcanist', 'workflow/base');
 
 phutil_require_module('phutil', 'console');
+phutil_require_module('phutil', 'utils');
 
 
 phutil_require_source('ArcanistHelpWorkflow.php');