Page MenuHomePhabricator

Fix `LINT_ARRAY_SEPARATOR` for nested arrays
ClosedPublic

Authored by joshuaspence on Sep 25 2014, 2:53 AM.
Tags
None
Referenced Files
F18048063: D10558.id.diff
Sun, Aug 3, 1:19 PM
F17761324: D10558.id25383.diff
Tue, Jul 22, 8:37 PM
F17746485: D10558.id25364.diff
Mon, Jul 21, 8:11 PM
F17724842: D10558.diff
Fri, Jul 18, 12:58 PM
Unknown Object (File)
Jun 29 2025, 12:30 PM
Unknown Object (File)
Jun 16 2025, 7:41 PM
Unknown Object (File)
Jun 16 2025, 7:40 PM
Unknown Object (File)
Jun 16 2025, 5:26 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.