]> khamidou — GitHub mirrors - arcanist.git/commit
Add a lint error about use of PHP short array syntax ('[...]')
authorepriestley <git@epriestley.com>
Mon, 1 Aug 2016 11:24:13 +0000 (04:24 -0700)
committerepriestley <git@epriestley.com>
Mon, 1 Aug 2016 17:45:09 +0000 (10:45 -0700)
commitf20d4b15c7e4a60fef9176ae6489c0978e6fbc87
treec168473e5ea2ea6ca657f399e974fc5bfe27e717
parent06c641f92c65bb833080f84083a58e3ce7b227ae
Add a lint error about use of PHP short array syntax ('[...]')

Summary: Ref T11409. Add lint to detect using `[...]` to define arrays. This doesn't work in PHP 5.2/5.3, which some of our users run.

Test Plan:
  - Ran `arc unit`.
  - Ran `arc lint src/applications/harbormaster/conduit/HarbormasterQueryBuildsConduitAPIMethod.php` to detect the issue in T11409.

Reviewers: yelirekim, chad

Reviewed By: chad

Maniphest Tasks: T11409

Differential Revision: https://secure.phabricator.com/D16357
src/lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php
src/lint/linter/xhpast/rules/__tests__/php-compatibility/php54-features.lint-test