diff --git a/src/lint/linter/__tests__/jshint/jshint.lint-test b/src/lint/linter/__tests__/jshint/jshint.lint-test --- a/src/lint/linter/__tests__/jshint/jshint.lint-test +++ b/src/lint/linter/__tests__/jshint/jshint.lint-test @@ -9,4 +9,4 @@ ~~~~~~~~~~ warning:3:8 error:7:1 -error:9: +error:9:1 diff --git a/src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php b/src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php --- a/src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/ArcanistXHPASTLinterRule.php @@ -213,6 +213,8 @@ $calls = $root->selectDescendantsOfType('n_FUNCTION_CALL'); $nodes = array(); + $function_names = array_map('strtolower', $function_names); + foreach ($calls as $call) { $node = $call->getChildByIndex(0); $name = strtolower($node->getConcreteString()); diff --git a/src/lint/linter/xhpast/rules/ArcanistDeprecationXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistDeprecationXHPASTLinterRule.php --- a/src/lint/linter/xhpast/rules/ArcanistDeprecationXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistDeprecationXHPASTLinterRule.php @@ -37,15 +37,17 @@ } public function process(XHPASTNode $root) { - $map = $this->deprecatedFunctions; - $function_calls = $this->getFunctionCalls($root, array_keys($map)); + $map = new CaseInsensitiveArray($this->deprecatedFunctions); + + $function_calls = $this->getFunctionCalls( + $root, + array_keys($this->deprecatedFunctions)); foreach ($function_calls as $call) { $name = $call ->getChildByIndex(0) ->getConcreteString(); - $name = strtolower($name); if (empty($map[$name])) { continue; } diff --git a/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test b/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test --- a/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test +++ b/src/lint/linter/xhpast/rules/__tests__/deprecation/deprecated-function.lint-test @@ -1,15 +1,17 @@