]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix incorrect variable for linter standards
authorJoshua Spence <josh@freelancer.com>
Fri, 29 Apr 2016 08:00:07 +0000 (08:00 +0000)
committereadler <autocommitter@example.com>
Fri, 29 Apr 2016 08:00:07 +0000 (08:00 +0000)
Summary: It is currently not possible to apply multiple linter standards because `$value` was used instead of `$standard`.

Test Plan: Was able to apply multiple linter standards.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: eadler, thaiphv, Korvin

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

src/lint/linter/ArcanistLinter.php

index d26951484a4c7cc8792352839b7eaa3a855013b3..6bb02e5d7656d0284b21a2d4955f25f5a9b8dec4 100644 (file)
@@ -574,8 +574,10 @@ abstract class ArcanistLinter extends Phobject {
       case 'standard':
         $standards = (array)$value;
 
-        foreach ($standards as $standard) {
-          $standard = ArcanistLinterStandard::getStandard($value, $this);
+        foreach ($standards as $standard_name) {
+          $standard = ArcanistLinterStandard::getStandard(
+            $standard_name,
+            $this);
 
           foreach ($standard->getLinterConfiguration() as $k => $v) {
             $this->setLinterConfigurationValue($k, $v);