Commit Graph

118 Commits

Author SHA1 Message Date
Xi Ge
e5d77911a2 [SourceKit] Indent property getters disregarding of empty bodies. rdar://28049927 (#5246)
[SourceKit] Indentation: when the indented line starts with open brace and the
line before starts with a leading declaration keywords, we never add
indentation level on the brace. rdar://28049927
2016-10-11 19:23:29 -07:00
Xi Ge
7cb5d9a8a2 [SourceKit] When function calls taking multiple closures, align the end of them. rdar://27473586 (#4787) 2016-09-14 19:13:50 -07:00
Xi Ge
365bb52a31 [SourceKit] Avoid adding indentation at the end of a CaptureListExpr. rdar://28193169 (#4749) 2016-09-13 13:33:34 -07:00
Xi Ge
5d07b4b068 [SourceKit][Format] Avoid indenting when multiple function call ends at the same line.
This fixes SR-603.
2016-07-25 17:57:57 -07:00
Daniel Martín
953076d9fc Fix coding style in Formatting.cpp (#3493) 2016-07-13 11:00:01 -07:00
Xi Ge
2ed177046e [SourceKit] Check location validity before getting the line number to fix a crash. rdar://26756189 (#3364) 2016-07-06 21:26:09 -07:00
Argyrios Kyrtzidis
49d786557c Fix bad merge, "#ifdef 0" -> "if 0" 2016-06-05 12:09:07 -07:00
Argyrios Kyrtzidis
20c5f53372 Merge pull request #2891 from practicalswift/remove-commented-out-code
[gardening] Remove commented out code.
2016-06-05 12:06:20 -07:00
practicalswift
2ef95264fc [gardening] Use the preferred form "#ifdef 0" instead of "/*". 2016-06-05 10:28:58 +02:00
practicalswift
d34114fec5 [gardening] Normalize formatting. Use "OS X" instead of "OSX". 2016-06-04 23:38:42 +02:00
practicalswift
57bccc8b06 [gardening] Fix inconsistent formatting. 2016-06-04 00:37:15 +02:00
Argyrios Kyrtzidis
d10220920b [IDE/format] Disable the sibling check for dictionary/array literal elements.
This ends up creating too much indentation in some common cases.
This effectively get us back to indentation behavior of Swift 2.2.

Addresses rdar://26290643.
2016-05-23 17:23:40 -07:00
practicalswift
abfecfde17 [gardening] if ([space]…[space]) → if (…), for(…) → for (…), while(…) → while (…), [[space]x, y[space]] → [x, y] 2016-04-04 16:22:11 +02:00
Ben Langmuir
4d9c9f6098 Move SourceEntityWalker into libAST NFC
It fits right in among our other AST walkers and lets us use it lower in
the stack than libIDE.
2016-04-01 14:14:06 -07:00
Xi Ge
589d9a8a3e CodeFormat: Avoid indenting the close bracket of a closure if the closure is on the RHS of an assignment expression. rdar://24507930 2016-03-29 13:08:55 -07:00
practicalswift
ac87f428ea [gardening] Fix formatting of recently introduced headers. 2016-03-22 21:36:09 +01:00
John Regner
5b9fc3d832 [SourceKit] Add reformat function to libIDE
Move all the rest of the code formatters and helper classes out of the interface.
2016-03-18 21:37:00 -07:00
John Regner
e63678579b [SourceKit] Moved Formatting files into place in libIDE 2016-03-18 21:19:57 -07:00