]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix the `ArcanistJSONLintLinter::getVersion` function.
authorJoshua Spence <josh@joshuaspence.com>
Sun, 18 May 2014 01:36:25 +0000 (18:36 -0700)
committerepriestley <git@epriestley.com>
Sun, 18 May 2014 01:36:25 +0000 (18:36 -0700)
Summary: Ref T4954. There was a typo in the original implementation. It wasn't noticed until now because the `getVersion` function isn't really used anywhere.

Test Plan: Ran `arc linters` in a repository with `ArcanistJSONLintLinter` configured, noticed that the version number appeared in the output.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4954

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

src/lint/linter/ArcanistJSONLintLinter.php

index fd49b89cc653f652dbdf24c917ade790554433a0..a4591cfab640a514aec191946ce3857639817e01 100644 (file)
@@ -37,7 +37,7 @@ final class ArcanistJSONLintLinter extends ArcanistExternalLinter {
 
     $matches = array();
     if (preg_match('/^(?P<version>\d+\.\d+\.\d+)$/', $stdout, $matches)) {
-      $version = $matches['version'];
+      return $matches['version'];
     } else {
       return false;
     }