Page MenuHomePhabricator

Add a linter rule for list assignments
ClosedPublic

Authored by joshuaspence on Aug 11 2015, 2:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 8:46 PM
Unknown Object (File)
Thu, Nov 21, 1:43 PM
Unknown Object (File)
Sun, Nov 17, 3:22 AM
Unknown Object (File)
Mon, Nov 11, 5:58 AM
Unknown Object (File)
Thu, Nov 7, 3:52 AM
Unknown Object (File)
Wed, Nov 6, 6:22 PM
Unknown Object (File)
Wed, Nov 6, 6:22 PM
Unknown Object (File)
Wed, Oct 30, 7:44 AM
Subscribers

Details

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.

Diff Detail

Repository
rARC Arcanist
Branch
master
Lint
Lint Passed
Unit
Tests Skipped
Build Status
Buildable 7596
Build 8232: [Placeholder Plan] Wait for 30 Seconds
Build 8231: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Add a linter rule for list assignments.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/lint/linter/__tests__/xhpast/list-assignment.lint-test
10

(The whitespace this decides on is a little weird.)

This revision is now accepted and ready to land.Aug 11 2015, 2:07 PM
This revision was automatically updated to reflect the committed changes.