Bug 268171 - Broken indentation for nested elements with short array syntax
Broken indentation for nested elements with short array syntax
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: Formatting & Indentation
8.2
All All
: P3 with 2 votes (vote)
: 8.2
Assigned To: junichi11
issues@php
82patch1-verified
:
: 268556 269142 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-23 12:15 UTC by rob006
Modified: 2016-12-15 12:15 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rob006 2016-09-23 12:15:32 UTC
Ctrl+Shift+F creates incorrect indentation for open bracket with short array syntax.

EXPECTED:

$t = [
	[
		'test',
	],
	'test1',
	[
		'test2',
	],
	['test3'],
	array('test4'),
];


ACTUAL:

$t = [
		[
		'test',
	],
	'test1',
		[
		'test2',
	],
		['test3'],
	array('test4'),
];
Comment 1 Tomas Mysik 2016-09-23 13:02:03 UTC
Not a P2, sorry.

Thanks for reporting.
Comment 2 rob006 2016-09-23 13:33:13 UTC
Any chance to fix this in 8.2? This bug makes autoformatting practically useless - nested arrays with short array syntax are quite common in any modern project. I tested autoformatter from 8.2-RC in my projects and right now it more often mess formatting than fixing it...
Comment 3 junichi11 2016-10-09 03:09:01 UTC
I'll fix it.

Thanks.
Comment 4 junichi11 2016-10-14 03:49:11 UTC
Fixed.

http://hg.netbeans.org/web-main/rev/df8faee2d566

Thanks.
Comment 5 Tomas Mysik 2016-10-14 06:30:27 UTC
Thanks a lot, Junichi!
Comment 6 Quality Engineering 2016-10-15 02:14:03 UTC
Integrated into 'main-silver', will be available in build *201610150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/df8faee2d566
User: Junichi Yamamoto <junichi11@netbeans.org>
Log: #268171 - Broken indentation for nested elements with short array syntax
Comment 7 Tomas Mysik 2016-10-17 12:21:28 UTC
*** Bug 268556 has been marked as a duplicate of this bug. ***
Comment 8 Tomas Mysik 2016-10-17 12:22:23 UTC
Could anyone please verify this issue using a dev build? Once verified, we can add it to the patch for NB 8.2.

Thanks!
Comment 9 rob006 2016-10-17 15:43:58 UTC
I confirm that it is fixed in netbeans-dev-201610170002.

Thanks for quick fix.
Comment 10 junichi11 2016-10-19 22:51:52 UTC
(In reply to rob006 from comment #9)
> I confirm that it is fixed in netbeans-dev-201610170002.

Thanks for your verification!
Comment 11 Tomas Mysik 2016-10-20 06:03:12 UTC
Yes, thanks a lot!
Comment 12 Tomas Mysik 2016-11-28 09:20:40 UTC
*** Bug 269142 has been marked as a duplicate of this bug. ***
Comment 13 Tomas Mysik 2016-12-03 14:09:23 UTC
Transplanted to the releases repo branch release82:

http://hg.netbeans.org/releases/rev/25f3594138e3

Thanks.
Comment 14 amobilia 2016-12-15 12:15:05 UTC
82patch1-verified


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo