]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for array separators
authorJoshua Spence <josh@joshuaspence.com>
Wed, 24 Sep 2014 21:38:37 +0000 (07:38 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Wed, 24 Sep 2014 21:40:30 +0000 (07:40 +1000)
commitbe428e32070097a11d77df9bd3fdebfa5baae71d
tree433855a80935f7b266aa58b68a7cf79b82c66808
parent13492c8043a4f04c9b270fda3d6b5f05267667e2
Add a linter rule for array separators

Summary:
Adds a rule to `ArcanistXHPASTLinter` which ensures that:

# Single-lined arrays //do not// contain an unnecessary trailing comma separator after the final array value.
# Multi-lined arrays //do// contain a trailing comma seperator after the final value value.

Depends on D10534.

Test Plan: Wrote and executed unit tests.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

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