]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for alias functions
authorJoshua Spence <josh@joshuaspence.com>
Sun, 17 May 2015 21:55:27 +0000 (07:55 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Sun, 17 May 2015 21:55:27 +0000 (07:55 +1000)
commite1a057b4d9384ea2c83d61257e776afca8edcf0b
treed5c0cddd926453c855f2fe30c05fc5d7e80e33e2
parente3a556af9b26ec746d613ccb32dff86dc542e3d2
Add a linter rule for alias functions

Summary: Ref T7409. Adds `ArcanistXHPASTLinter::LINT_ALIAS_FUNCTION` for linting the use of alias funtions. Based on [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php | Generic_Sniffs_PHP_ForbiddenFunctionsSniff]]. See [[http://php.net/manual/en/aliases.php | list of function aliases]].

Test Plan: Added unit tests.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T7409

Differential Revision: https://secure.phabricator.com/D12422
src/lint/linter/ArcanistXHPASTLinter.php
src/lint/linter/__tests__/xhpast/alias-functions.lint-test [new file with mode: 0644]