Page MenuHomePhabricator

Fix `LINT_ARRAY_SEPARATOR` for nested arrays
ClosedPublic

Authored by joshuaspence on Sep 25 2014, 2:53 AM.
Tags
None
Referenced Files
F18866517: D10558.id.diff
Mon, Nov 3, 5:37 PM
F18860459: D10558.diff
Sun, Nov 2, 11:43 AM
F18823750: D10558.diff
Thu, Oct 23, 1:12 PM
F18821183: D10558.id.diff
Wed, Oct 22, 8:06 PM
F18463454: D10558.id25381.diff
Sep 2 2025, 1:14 AM
F18462976: D10558.id25381.diff
Sep 1 2025, 11:45 PM
F18462441: D10558.id.diff
Sep 1 2025, 10:15 PM
F18462331: D10558.diff
Sep 1 2025, 10:00 PM
Subscribers

Details

Summary

The LINT_ARRAY_SEPARATOR rule was added to ArcanistXHPASTLinter in D10535. Unfortunately, it does not correctly handle nested arrays correctly. This patch fixes this. Depends on D10554.

Test Plan

Added a test case.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Fix `LINT_ARRAY_SEPARATOR` for nested arrays.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

Another possible issue:

     $keys = array(
       'key1' => mt_rand(),
       'key2' => '',
-      'key3' => 'Phabricator');
+      'key3' => 'Phabricator',);
epriestley edited edge metadata.
This revision is now accepted and ready to land.Sep 25 2014, 1:26 PM
This revision was automatically updated to reflect the committed changes.