1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Fix some Arcanist lint warnings

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
This commit is contained in:
epriestley 2013-06-04 15:29:39 -07:00
parent ae66d4caa9
commit e93726cb3b
4 changed files with 21 additions and 12 deletions

View file

@ -363,6 +363,7 @@ class ArcanistSpellingDefaultData {
"ploting" => "plotting", "ploting" => "plotting",
"posible" => "possible", "posible" => "possible",
"powerfull" => "powerful", "powerfull" => "powerful",
"preceed" => "precede",
"preceeded" => "preceded", "preceeded" => "preceded",
"preceeding" => "preceding", "preceeding" => "preceding",
"precendence" => "precedence", "precendence" => "precedence",
@ -463,7 +464,10 @@ class ArcanistSpellingDefaultData {
"suppoted" => "supported", "suppoted" => "supported",
"suppported" => "supported", "suppported" => "supported",
"suppport" => "support", "suppport" => "support",
"supress" => "suppress",
"surpress" => "suppress",
"surpresses" => "suppresses", "surpresses" => "suppresses",
"surpesses" => "suppresses",
"suspicously" => "suspiciously", "suspicously" => "suspiciously",
"synax" => "syntax", "synax" => "syntax",
"synchonized" => "synchronized", "synchonized" => "synchronized",

View file

@ -149,7 +149,7 @@ EOTEXT
$files, $files,
$tmp_file); $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}. // warnings; see @{method:getSVNLangEnvVar}.
if (!phutil_is_windows()) { if (!phutil_is_windows()) {
$command = csprintf('LANG=%C %C', $this->getSVNLangEnvVar(), $command); $command = csprintf('LANG=%C %C', $this->getSVNLangEnvVar(), $command);

View file

@ -181,7 +181,7 @@ EOTEXT
$futures[$branch['name']] = $repository_api->execFutureLocal( $futures[$branch['name']] = $repository_api->execFutureLocal(
"log -l 1 --template '%C' -r %s", "log -l 1 --template '%C' -r %s",
"{node}\1{date|hgdate}\1{p1node}\1{desc|firstline}\1{desc}", "{node}\1{date|hgdate}\1{p1node}\1{desc|firstline}\1{desc}",
hgsprintf($branch['name'])); hgsprintf('%s', $branch['name']));
} else { } else {
// NOTE: "-s" is an option deep in git's diff argument parser that // NOTE: "-s" is an option deep in git's diff argument parser that

View file

@ -53,7 +53,7 @@ EOTEXT
"Only show tasks assigned to the given username, ". "Only show tasks assigned to the given username, ".
"also accepts @all to show all, default is you.", "also accepts @all to show all, default is you.",
'conflict' => array( 'conflict' => array(
"unassigned" => "--owner supresses unassigned", "unassigned" => "--owner suppresses unassigned",
), ),
), ),
'order' => array( 'order' => array(
@ -83,16 +83,16 @@ EOTEXT
$unassigned = $this->getArgument('unassigned'); $unassigned = $this->getArgument('unassigned');
if ($owner) { if ($owner) {
$ownerPHID = $this->findOwnerPhid($owner); $owner_phid = $this->findOwnerPhid($owner);
} elseif ($unassigned) { } elseif ($unassigned) {
$ownerPHID = null; $owner_phid = null;
} else { } else {
$ownerPHID = $this->getUserPHID(); $owner_phid = $this->getUserPHID();
} }
$this->tasks = $this->loadManiphestTasks( $this->tasks = $this->loadManiphestTasks(
($status == 'all' ? 'any' : $status), ($status == 'all' ? 'any' : $status),
$ownerPHID, $owner_phid,
$order, $order,
$limit); $limit);
@ -225,32 +225,37 @@ EOTEXT
echo $table; echo $table;
} }
private function findOwnerPhid($owner) { private function findOwnerPHID($owner) {
$conduit = $this->getConduit(); $conduit = $this->getConduit();
$owner_phid = $conduit->callMethodSynchronous( $owner_phid = $conduit->callMethodSynchronous(
'user.find', 'user.find',
array( array(
'aliases' => array($owner), '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) { private function loadManiphestTasks($status, $owner_phid, $order, $limit) {
$conduit = $this->getConduit(); $conduit = $this->getConduit();
$find_params = array(); $find_params = array();
if ($owner_phid !== false) { if ($owner_phid !== null) {
$find_params['ownerPHIDs'] = array($owner_phid); $find_params['ownerPHIDs'] = array($owner_phid);
} }
if ($limit !== false) { if ($limit !== false) {
$find_params['limit'] = $limit; $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( $tasks = $conduit->callMethodSynchronous(
'maniphest.find', 'maniphest.find',
$find_params); $find_params);
return $tasks; return $tasks;
} }