Xcode8: Swift indentation gets weird when comments are involved

Originator:markd
Number:rdar://27776466 Date Originated:8/9/2016
Status:Open Resolved:
Product:Developer Tools Product Version:Version 8.0 beta 5 (8S193k)
Classification:Usability/UI Reproducible:Always
 
Summary:
Hi! 

I have a function with a bunch of arguments (I know CG has renamed these, but I haven't compiled yet, so Xcode shouldn't care. I have other C-based APIs with a zillion arguments I have to deal with).  I want to put some of the arguments on their own lines so that I can comment what they are.

Xcode happily lines up arguments on subsequent lines as I wish, unless a comment is in place. In that case it zings the line over to the left with just a four-space indent, rather than the many-more-than-four-spaces of the immediately preceding lines. 

This leads to a pretty ugly result (screen shot attached).  It'd be groovy if they all lined up under the opening paren.

(I use black for my syntax colorization due to my vision correction, so source kit hasn't crashed)

Steps to Reproduce:


Expected Results:


Actual Results:


Version:
Version 8.0 beta 5 (8S193k)
10.11.5 (15F34)


Notes:


Configuration:


Attachments:
'weird-indent.mp4' and 'Screen Shot 2016-08-09 at 7.30.46 PM.png' were successfully uploaded.


Happens after converting the old CGFunction call into the proper CGImage(...) call. (see attached image)

'Screen Shot 2016-08-09 at 7.35.18 PM.png' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!