]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix some Arcanist lint warnings
authorepriestley <git@epriestley.com>
Tue, 4 Jun 2013 22:29:39 +0000 (15:29 -0700)
committerepriestley <git@epriestley.com>
Tue, 4 Jun 2013 22:29:39 +0000 (15:29 -0700)
Summary: Lint. See https://github.com/facebook/phabricator/pull/332

Test Plan: Lint.

Reviewers: chad

Reviewed By: chad

CC: aran
Differential Revision: https://secure.phabricator.com/D6126

src/lint/linter/spelling/ArcanistSpellingDefaultData.php
src/workflow/ArcanistCommitWorkflow.php
src/workflow/ArcanistFeatureWorkflow.php
src/workflow/ArcanistTasksWorkflow.php

index 6bd9091d69be33478203ebc0d69fea12d48ff717..5c69a9f73c98fafbb94e6c2b0d0ce19c63b970e7 100644 (file)
@@ -363,6 +363,7 @@ class ArcanistSpellingDefaultData {
        "ploting" => "plotting",
        "posible" => "possible",
        "powerfull" => "powerful",
+       "preceed" => "precede",
        "preceeded" => "preceded",
        "preceeding" => "preceding",
        "precendence" => "precedence",
@@ -463,7 +464,10 @@ class ArcanistSpellingDefaultData {
        "suppoted" => "supported",
        "suppported" => "supported",
        "suppport" => "support",
+       "supress" => "suppress",
+       "surpress" => "suppress",
        "surpresses" => "suppresses",
+       "surpesses" => "suppresses",
        "suspicously" => "suspiciously",
        "synax" => "syntax",
        "synchonized" => "synchronized",
index 9570c94d30e30a7b97154292e31c3ec522dd13b2..45243ac9d2096ad237e108f0ef3773bc44843fa0 100644 (file)
@@ -149,7 +149,7 @@ EOTEXT
       $files,
       $tmp_file);
 
-    // make sure to specify LANG on non-windows systems to surpress any fancy
+    // make sure to specify LANG on non-windows systems to suppress any fancy
     // warnings; see @{method:getSVNLangEnvVar}.
     if (!phutil_is_windows()) {
       $command = csprintf('LANG=%C %C', $this->getSVNLangEnvVar(), $command);
index e1601d08d08c0458510395472fd7f60590f91549..bc216ca39bec0862161a15caa8a14fdbeb6c6782 100644 (file)
@@ -181,7 +181,7 @@ EOTEXT
         $futures[$branch['name']] = $repository_api->execFutureLocal(
           "log -l 1 --template '%C' -r %s",
           "{node}\1{date|hgdate}\1{p1node}\1{desc|firstline}\1{desc}",
-          hgsprintf($branch['name']));
+          hgsprintf('%s', $branch['name']));
 
       } else {
         // NOTE: "-s" is an option deep in git's diff argument parser that
index 1e08a0d679e38c6e1732231ed20977807ca9086e..5aadd2cfa81b0e0c6bdc27f810e80e9f7115d828 100644 (file)
@@ -53,7 +53,7 @@ EOTEXT
           "Only show tasks assigned to the given username, ".
             "also accepts @all to show all, default is you.",
         'conflict' => array(
-          "unassigned" => "--owner supresses unassigned",
+          "unassigned" => "--owner suppresses unassigned",
         ),
       ),
       'order' => array(
@@ -83,16 +83,16 @@ EOTEXT
     $unassigned = $this->getArgument('unassigned');
 
     if ($owner) {
-      $ownerPHID = $this->findOwnerPhid($owner);
+      $owner_phid = $this->findOwnerPhid($owner);
     } elseif ($unassigned) {
-      $ownerPHID = null;
+      $owner_phid = null;
     } else {
-      $ownerPHID = $this->getUserPHID();
+      $owner_phid = $this->getUserPHID();
     }
 
     $this->tasks = $this->loadManiphestTasks(
       ($status == 'all' ? 'any' : $status),
-      $ownerPHID,
+      $owner_phid,
       $order,
       $limit);
 
@@ -225,32 +225,37 @@ EOTEXT
     echo $table;
   }
 
-  private function findOwnerPhid($owner) {
+  private function findOwnerPHID($owner) {
     $conduit = $this->getConduit();
+
     $owner_phid = $conduit->callMethodSynchronous(
       'user.find',
       array(
         'aliases' => array($owner),
       ));
-    return (isset($owner_phid[$owner])?$owner_phid[$owner]:false);
+
+    return idx($owner_phid, $owner);
   }
 
   private function loadManiphestTasks($status, $owner_phid, $order, $limit) {
     $conduit = $this->getConduit();
 
     $find_params = array();
-    if ($owner_phid !== false) {
+    if ($owner_phid !== null) {
       $find_params['ownerPHIDs'] = array($owner_phid);
     }
+
     if ($limit !== false) {
       $find_params['limit'] = $limit;
     }
-    $find_params['order'] = ($order?"order-".$order:"order-priority");
-    $find_params['status'] = ($status?"status-".$status:"status-open");
+
+    $find_params['order'] = ($order ? "order-".$order : "order-priority");
+    $find_params['status'] = ($status ? "status-".$status : "status-open");
 
     $tasks = $conduit->callMethodSynchronous(
       'maniphest.find',
       $find_params);
+
     return $tasks;
   }