]> khamidou — GitHub mirrors - arcanist.git/commit
Add a linter rule for list assignments
authorJoshua Spence <josh@joshuaspence.com>
Wed, 12 Aug 2015 03:22:37 +0000 (13:22 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Wed, 12 Aug 2015 03:22:37 +0000 (13:22 +1000)
commitf4c322cb72cd479080cedb52018bcb1435043192
tree704d15628246df2ae3ff5e4ce97c9667723efc0f
parent807057087d65298e69bb8260db81bee1ae109084
Add a linter rule for list assignments

Summary: Add a linter rule to prevent trailing commas in a list assignment. `list($x, $y,)` is equivalent to `list($x, $y)`, but the latter is cleaner and should be preferred.

Test Plan: Added test cases.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13870
src/__phutil_library_map__.php
src/lint/linter/__tests__/xhpast/list-assignment.lint-test [new file with mode: 0644]
src/lint/linter/xhpast/rules/ArcanistListAssignmentXHPASTLinterRule.php [new file with mode: 0644]