]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Minor linter fixes
authorJoshua Spence <josh@joshuaspence.com>
Sat, 27 Sep 2014 00:21:23 +0000 (10:21 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Sat, 27 Sep 2014 00:21:23 +0000 (10:21 +1000)
Summary: Apply some linter autofixes.

Test Plan: `arc lint` and `arc unit`

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

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

21 files changed:
scripts/arcanist.php
src/configuration/ArcanistSettings.php
src/difference/ArcanistDiffUtils.php
src/hgdaemon/ArcanistHgProxyServer.php
src/lint/linter/ArcanistExternalLinter.php
src/lint/linter/ArcanistLesscLinter.php
src/lint/linter/ArcanistLinter.php
src/lint/linter/ArcanistPuppetLintLinter.php
src/lint/linter/ArcanistXHPASTLinter.php
src/parser/ArcanistDiffParser.php
src/repository/api/ArcanistMercurialAPI.php
src/unit/engine/CSharpToolsTestEngine.php
src/workflow/ArcanistBackoutWorkflow.php
src/workflow/ArcanistCloseWorkflow.php
src/workflow/ArcanistCommitWorkflow.php
src/workflow/ArcanistDiffWorkflow.php
src/workflow/ArcanistExportWorkflow.php
src/workflow/ArcanistLintWorkflow.php
src/workflow/ArcanistPatchWorkflow.php
src/workflow/ArcanistStartWorkflow.php
src/workflow/ArcanistUnitWorkflow.php

index 1f692c16290502cf1d4e0f8578531e88fa9856c8..8714bcd16b9f0c0b0082b3572e3f344b6bfbe2ed 100755 (executable)
@@ -46,7 +46,7 @@ $base_args->parsePartial(
       'repeat' => true,
       'help'   =>
         'Specify a runtime configuration value. This will take precedence '.
-        'over static values, and only affect the current arcanist invocation.'
+        'over static values, and only affect the current arcanist invocation.',
     ),
 ));
 
@@ -413,7 +413,7 @@ function sanity_check_environment() {
         'text',
         "You need to install the cURL PHP extension, maybe with ".
         "'apt-get install php5-curl' or 'yum install php53-curl' or ".
-        "something similar."),
+        "something similar.",),
       'json_decode'   => array('flag', '--without-json'),
     );
   }
index 796bc1772a500d5b0502a0ad810aa6562eb1fe6c..b4c54a9f3919128016ee207c2c01b5ce9150c457 100644 (file)
@@ -126,7 +126,7 @@ final class ArcanistSettings {
           "Path to a custom CA bundle file to be used for arcanist's cURL ".
           "calls. This is used primarily when your conduit endpoint is ".
           "behind https signed by your organization's internal CA.",
-        'example' => 'support/yourca.pem'
+        'example' => 'support/yourca.pem',
       ),
       'https.blindly-trust-domains' => array(
         'type' => 'list',
index 2c89599e6d3453b6303d33aaf218a6c931e29bf6..c789cddcde1f85df64b9dbad18cc305d8c37ea36 100644 (file)
@@ -52,7 +52,7 @@ final class ArcanistDiffUtils {
     if (($o === $n) || !$ol || !$nl) {
       return array(
         array(array(0, $ol)),
-        array(array(0, $nl))
+        array(array(0, $nl)),
       );
     }
 
index 93ef5af48885c51bd50d8fd8eb8a4436547c1ede..a6e19a251c2b5fa5aadcea28a30671b301701160 100644 (file)
@@ -177,7 +177,7 @@ final class ArcanistHgProxyServer {
         array_merge($clients, array($hg)),
         array(
           'read'    => $socket ? array($socket) : array(),
-          'except'  => $socket ? array($socket) : array()
+          'except'  => $socket ? array($socket) : array(),
         ));
 
       if (!$hg->update()) {
index e5efb9907398a426b7917d5bfddd225b71f1fdda..f85d09daf599206f4bf3752d5428a2147fc46ff8 100644 (file)
@@ -432,7 +432,7 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
           'Specify a string (or list of strings) identifying the binary '.
           'which should be invoked to execute this linter. This overrides '.
           'the default binary. If you provide a list of possible binaries, '.
-          'the first one which exists will be used.')
+          'the first one which exists will be used.'),
       ),
       'flags' => array(
         'type' => 'optional list<string>',
index 9e6647e16375aebe5e40cb164284220535a004c4..00a40436ce57838b2ccba9dc3df84491b198bb8b 100644 (file)
@@ -121,7 +121,8 @@ final class ArcanistLesscLinter extends ArcanistExternalLinter {
       '--lint',
       '--no-color',
       '--strict-math='.($this->strictMath ? 'on' : 'off'),
-      '--strict-units='.($this->strictUnits ? 'on' : 'off'));
+      '--strict-units='.($this->strictUnits ? 'on' : 'off'),
+    );
   }
 
   protected function parseLinterOutput($path, $err, $stdout, $stderr) {
index 76ff9c64af8c27684cbd0b9592b449f68abee57a..fa43496c7a6442013434b9492132674eb7929651 100644 (file)
@@ -351,7 +351,7 @@ abstract class ArcanistLinter {
         'type' => 'optional map<string|int, string>',
         'help' => pht(
           'Provide a map from lint codes to adjusted severity levels: error, '.
-          'warning, advice, autofix or disabled.')
+          'warning, advice, autofix or disabled.'),
       ),
       'severity.rules' => array(
         'type' => 'optional map<string, string>',
index 230ce540790343f3fb2ccfc6ccb9f2b8fccf4d26..efe83e9d386b8583ab99a55e63d3a6644809600d 100644 (file)
@@ -63,7 +63,9 @@ final class ArcanistPuppetLintLinter extends ArcanistExternalLinter {
       '%{column}',
       '%{kind}',
       '%{check}',
-      '%{message}'))));
+      '%{message}',
+      ))),
+    );
   }
 
   public function getLinterConfigurationOptions() {
index 183da16e1ce9ebc8f9abc0d6e7948e431f0db0d8..2a84ed30cffaf79d3479cda1f1bfec357d755777 100644 (file)
@@ -1840,7 +1840,8 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
           $global,
 
           // No advice for globals, but hooks have an option to provide some.
-          null);
+          null,
+        );
       }
 
       // Exclude access of static properties, since lint will be raised at
index 658601c3bd7e16d2ab5e6d9107305dd1dbc18031..bbe01d0f289b3fe12e268d9ab9d1b5afeef9a170 100644 (file)
@@ -564,7 +564,7 @@ final class ArcanistDiffParser {
           'rename from (?P<old>.*)',
           '(?P<move>rename) to (?P<cur>.*)',
           'copy from (?P<old>.*)',
-          '(?P<copy>copy) to (?P<cur>.*)'
+          '(?P<copy>copy) to (?P<cur>.*)',
         );
 
         $ok = false;
index 27e579e89a51b7d6db0e3e6ac8ecd0edebfa7509..0bd6e60d96b82e255bbc95962867c646859f202c 100644 (file)
@@ -1054,7 +1054,8 @@ final class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
         $bookmarks[] = array(
           'is_active' => $is_active,
           'name' => $name,
-          'revision' => $revision);
+          'revision' => $revision,
+        );
       }
     }
 
index aec00c73d73d7b32769b197e5c95d9e9bcfc8104..03ad75bbda0116a4ea401c4f69867a5f529344ef 100644 (file)
@@ -133,7 +133,8 @@ final class CSharpToolsTestEngine extends XUnitTestEngine {
     return array(
       $future,
       $assembly_dir.DIRECTORY_SEPARATOR.$xunit_temp,
-      $cover_temp);
+      $cover_temp,
+    );
   }
 
   /**
@@ -195,7 +196,8 @@ final class CSharpToolsTestEngine extends XUnitTestEngine {
       $results[] = array(
         'file' => $tag->getAttribute('file'),
         'start' => $tag->getAttribute('start'),
-        'end' => $tag->getAttribute('end'));
+        'end' => $tag->getAttribute('end'),
+      );
     }
     return $results;
   }
index 6b12bc04cd94b84c28db59adeb87e1b9f000ad0f..7d37853a5743deb9754d7bcc28fb48be0943c19b 100644 (file)
@@ -118,7 +118,7 @@ EOTEXT
       array(
         'revision_id' => null,
         'edit'        => 'create',
-        'fields'      => $fields
+        'fields'      => $fields,
         ));
     $template = $this->newInteractiveEditor($template)
       ->setName('new-commit')
index 76cde414f4f56d8c9d407a10b981c4bcee16cff3..083ec355c01f0ad757c83a534fbb937f9a6715ef 100644 (file)
@@ -129,7 +129,7 @@ EOTEXT
     $info = $conduit->callMethodSynchronous(
       'maniphest.info',
       array(
-        'task_id' => $task_id
+        'task_id' => $task_id,
       ));
     if ($info['status'] == $status) {
       return false;
@@ -139,7 +139,7 @@ EOTEXT
       array(
         'id' => $task_id,
         'status' => $status,
-        'comments' => $comment
+        'comments' => $comment,
       ));
   }
 
index 840cc2615e38e8174bd88fce5b754f8987861799..dbd2b7910d8797bffca3c8b0cdf964a711d00e5a 100644 (file)
@@ -51,14 +51,14 @@ EOTEXT
       'show' => array(
         'help' =>
           'Show the command which would be issued, but do not actually '.
-          'commit anything.'
+          'commit anything.',
       ),
       'revision' => array(
         'param' => 'revision_id',
         'help' =>
           'Commit a specific revision. If you do not specify a revision, '.
           'arc will look for committable revisions.',
-      )
+      ),
     );
   }
 
index a8e13ab2b2652315ba3a14fe36597e52de783cd1..b2dd8ffc85ccd839fec190fdcf1c91f42930d9e2 100644 (file)
@@ -406,7 +406,7 @@ EOTEXT
           'lintall'   => '--head suppresses lint.',
           'advice'    => '--head suppresses lint.',
         ),
-      )
+      ),
     );
 
     return $arguments;
index a7ebb98118b574b6b75f2e275999e6ba4e60a337..01abb79f21bfa3b89d41a33556665d6f195edf41 100644 (file)
@@ -70,13 +70,13 @@ EOTEXT
         'param' => 'revision_id',
         'help' =>
           'Instead of exporting changes from the working copy, export them '.
-          'from a Differential revision.'
+          'from a Differential revision.',
       ),
       'diff' => array(
         'param' => 'diff_id',
         'help' =>
           'Instead of exporting changes from the working copy, export them '.
-          'from a Differential diff.'
+          'from a Differential diff.',
       ),
       '*' => 'paths',
     );
index 396e3ed8f661933e642562fc723b2d7198363d6a..20f636a659e3bbf594f5201b519fcda527f672c2 100644 (file)
@@ -95,7 +95,7 @@ EOTEXT
           "With 'json', show lint warnings in machine-readable JSON format. ".
           "With 'none', show no lint warnings. ".
           "With 'compiler', show lint warnings in suitable for your editor. ".
-          "With 'xml', show lint warnings in the Checkstyle XML format."
+          "With 'xml', show lint warnings in the Checkstyle XML format.",
       ),
       'only-new' => array(
         'param' => 'bool',
@@ -105,7 +105,7 @@ EOTEXT
       'engine' => array(
         'param' => 'classname',
         'help' =>
-          'Override configured lint engine for this project.'
+          'Override configured lint engine for this project.',
       ),
       'apply-patches' => array(
         'help' =>
@@ -135,7 +135,7 @@ EOTEXT
         'help' => 'Lint all files in the project.',
         'conflicts' => array(
           'cache' => '--everything lints all files',
-          'rev' => '--everything lints all files'
+          'rev' => '--everything lints all files',
         ),
       ),
       'severity' => array(
index 1e7d21bb489b6fbb429c66f9335a3cbd3aad1241..167704de23dcc83c56621456f3da673cfe1aea84 100644 (file)
@@ -499,7 +499,8 @@ EOTEXT
             } else {
               $copies[] = array(
                 $change->getOldPath(),
-                $change->getCurrentPath());
+                $change->getCurrentPath(),
+              );
             }
             break;
           case ArcanistDiffChangeType::TYPE_ADD:
@@ -864,7 +865,7 @@ EOTEXT
         'differential.query',
         array(
           'phids' => $phids,
-          'arcanistProjects' => array($bundle->getProjectID())
+          'arcanistProjects' => array($bundle->getProjectID()),
         ));
       $revs = array();
       foreach ($dep_on_revs as $dep_on_rev) {
@@ -876,7 +877,8 @@ EOTEXT
         $base_args = array(
           '--force',
           '--skip-dependencies',
-          '--nobranch');
+          '--nobranch',
+        );
         if (!$this->shouldCommit()) {
           $base_args[] = '--nocommit';
         }
index 389023e51f30df8750f7ac85e294a0ca4c704e3b..483f334c9caba07172f437a7cd7025e60e700025 100644 (file)
@@ -63,7 +63,7 @@ EOTEXT
       $started_phids[] = $conduit->callMethodSynchronous(
         'phrequent.push',
         array(
-          'objectPHID' => $object_phid
+          'objectPHID' => $object_phid,
         ));
     }
 
index f8d7a15bdd072ee8ee14128d41db49f1f7f05517..f302ba75e0fe9a4658c1ad9082dd879924c7005b 100644 (file)
@@ -52,7 +52,7 @@ EOTEXT
       'engine' => array(
         'param' => 'classname',
         'help' =>
-          'Override configured unit engine for this project.'
+          'Override configured unit engine for this project.',
       ),
       'coverage' => array(
         'help' => 'Always enable coverage information.',
@@ -80,7 +80,7 @@ EOTEXT
         'conflicts' => array(
           'json' => 'Only one output format allowed',
           'ugly' => 'Only one output format allowed',
-        )
+        ),
       ),
       'everything' => array(
         'help' => 'Run every test.',