]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix PHP compatibility linter after improvements to parsing of `use` statements
authorJoshua Spence <josh@freelancer.com>
Thu, 19 Nov 2015 19:50:08 +0000 (06:50 +1100)
committerJoshua Spence <josh@freelancer.com>
Thu, 19 Nov 2015 19:50:08 +0000 (06:50 +1100)
Summary: Fix the `PHPCompatibilityXHPASTLinterRule` after changes to the way in which #xhpast parses `use` statements. Depends on D14518.

Test Plan: Unit tests

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

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

src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
src/lint/linter/xhpast/rules/__tests__/php-compatibility/php53-features.lint-test

index e2f627a329edb500c105b8abd21712f6102573be..b91fc560d8366b02610a2a25bf778f8f668a0858 100644 (file)
@@ -295,9 +295,6 @@ final class ArcanistPHPCompatibilityXHPASTLinterRule
     // NOTE: This is only "use x;", in anonymous functions the node type is
     // n_LEXICAL_VARIABLE_LIST even though both tokens are T_USE.
 
-    // TODO: We parse n_USE in a slightly crazy way right now; that would be
-    // a better selector once it's fixed.
-
     $uses = $root->selectDescendantsOfType('n_USE_LIST');
     foreach ($uses as $use) {
       $this->raiseLintAtNode(
index a22372938f6a3c9e0f6dbef431389f9ac286929e..a867aeab2c3364ee00584b605e519e3599a9b406 100644 (file)
@@ -12,7 +12,7 @@ $a::m();
 echo __DIR__;
 ~~~~~~~~~~
 error:3:1
-error:4:5
+error:4:1
 error:5:3
 error:6:3
 error:7:1