]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for the use of `parse_str`
authorJoshua Spence <josh@joshuaspence.com>
Thu, 13 Aug 2015 21:44:19 +0000 (07:44 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Thu, 13 Aug 2015 21:45:27 +0000 (07:45 +1000)
commitfe8ed2a6f8b09b8c56e476ed1f9624d35732b776
treecc07afda078ee0bec5448c751eafdf57acaae252
parent2e76e2965cbee3672a2aece8c56850490f707232
Add a linter rule for the use of `parse_str`

Summary: The use of the [[http://php.net/manual/en/function.parse-str.php | parse_str]] method (when called without sepcifying a second parameter) hinders static analysis. Specifically, the `parse_str('...')` behaves similarly to [[http://php.net/manual/en/function.extract.php | extract]].

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13857
src/__phutil_library_map__.php
src/lint/linter/__tests__/xhpast/extract-use.lint-test [new file with mode: 0644]
src/lint/linter/__tests__/xhpast/parse_str-use.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/ArcanistParseStrUseXHPASTLinterRule.php [new file with mode: 0644]
src/lint/linter/xhpast/rules/ArcanistUndeclaredVariableXHPASTLinterRule.php