]> khamidou — GitHub mirrors - arcanist.git/commit
Update xhpast linter rules for new function AST format
authorRichard van Velzen <rvanvelzen@experty.com>
Thu, 28 Apr 2016 14:59:50 +0000 (16:59 +0200)
committerRichard van Velzen <rvanvelzen@experty.com>
Fri, 29 Apr 2016 12:38:10 +0000 (14:38 +0200)
commit3ffed59bd7fb19e8d712aca9b86bf5ce55b7d8ca
tree5f4c241b664c17fddae646965934d35a11db4290
parentea6fc7789295fc090ed2dd35dc19bfa464478024
Update xhpast linter rules for new function AST format

Summary: See D15678. A node containing a return type hint is added right before the statement body node. This updates all relevant linter rules to now retrieve the body from the correct index.

Test Plan: Ran `arc unit --everything`, inspected every single message to make sure all xhpast test cases succeeded. Also grepped for `getChildByIndex(5` and `getChildOfType(5`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15814
src/lint/linter/xhpast/rules/ArcanistAbstractMethodBodyXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistInterfaceMethodBodyXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistReusedAsIteratorXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistReusedIteratorReferenceXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistStaticThisXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistToStringExceptionXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistUndeclaredVariableXHPASTLinterRule.php
src/lint/linter/xhpast/rules/ArcanistUselessOverridingMethodXHPASTLinterRule.php