Page MenuHomePhabricator

Fix `LINT_ARRAY_SEPARATOR` for nested arrays
ClosedPublic

Authored by joshuaspence on Sep 25 2014, 2:53 AM.
Tags
None
Referenced Files
F15418262: D10558.diff
Thu, Mar 20, 10:05 PM
F15401610: D10558.id25364.diff
Mon, Mar 17, 6:29 PM
F15330857: D10558.id25383.diff
Fri, Mar 7, 8:06 AM
Unknown Object (File)
Feb 17 2025, 3:23 PM
Unknown Object (File)
Feb 17 2025, 1:40 AM
Unknown Object (File)
Feb 8 2025, 6:54 PM
Unknown Object (File)
Feb 7 2025, 11:28 PM
Unknown Object (File)
Feb 7 2025, 11:28 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.