Page MenuHomePhabricator

Add a linter rule for list assignments
ClosedPublic

Authored by joshuaspence on Aug 11 2015, 2:07 PM.
Tags
None
Referenced Files
F13920282: D13870.diff
Thu, Oct 10, 5:10 PM
Unknown Object (File)
Wed, Oct 2, 9:09 PM
Unknown Object (File)
Sat, Sep 14, 2:38 PM
Unknown Object (File)
Sep 1 2024, 2:22 PM
Unknown Object (File)
Aug 19 2024, 12:49 AM
Unknown Object (File)
Aug 19 2024, 12:49 AM
Unknown Object (File)
Aug 18 2024, 3:19 PM
Unknown Object (File)
Aug 18 2024, 3:19 PM
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.