]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule to detect call-time pass-by-reference
authorJoshua Spence <josh@joshuaspence.com>
Thu, 22 Jan 2015 20:28:55 +0000 (07:28 +1100)
committerJoshua Spence <josh@joshuaspence.com>
Thu, 22 Jan 2015 20:56:58 +0000 (07:56 +1100)
commit1a3afa44297f8268410797dc5195a51068ceb908
treed74f89db379f8dad6a67b1e7457dae374ad55cf3
parent0b22838ccaa88ff2840f04e0a4b329d741f20144
Add a linter rule to detect call-time pass-by-reference

Summary: Call-time [[http://php.net/manual/en/language.references.pass.php | pass-by-reference]] is an awful "feature" of PHP that is deprecated and removed in PHP 5.4 (see http://us1.php.net/manual/en/migration54.incompatible.php). Add a linter rule to `ArcanistXHPASTLinter` to detect the use of this feature and raise an error.

Test Plan: Added a test case for `arc unit`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10537
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/call-time-pass-by-reference.lint-test [new file with mode: 0644]