Commit Graph

141 Commits

Author SHA1 Message Date
Nikolay Krasko 6a4590839c Don't merge two lines in formatter after line comment (KT-16032)
#KT-16032 Fixed
2017-02-22 20:12:19 +03:00
Nikolay Krasko d58707972d Keep empty bodies for declarations with comments (KT-16078)
#KT-16078 Fixed
2017-02-17 15:57:11 +03:00
Ilya Zorin c5677f0428 Format spaces around :: 2017-01-09 12:19:29 +01:00
Ilya Zorin ffe80dd549 Format spaces around by keyword (#1016) 2017-01-09 11:19:44 +01:00
Nikolay Krasko 2bb48fc802 Allow empty single-line bodies in property accessors 2016-12-14 13:40:44 +03:00
Nikolay Krasko 2841931ffa Do not force new line in body for empty functions and function expressions (KT-10828)
#KT-10828 Fixed
2016-12-14 13:35:31 +03:00
Nikolay Krasko 43948a0170 Wrap options for constructor parameters
#KT-12176 In Progress
2016-12-08 15:15:12 +03:00
Dmitry Neverov 3cc3ad2b9e Fix spaces in labeled expression (KT-14131)
https://github.com/JetBrains/kotlin/pull/978

(cherry picked from commit fdd5ba7)
2016-10-20 19:22:00 +03:00
Dmitry Neverov c3c5805a5f Fix indent in constructor delegate call (KT-7718)
(cherry picked from commit 5699b14)

 #KT-7718 Fixed
2016-10-18 14:01:51 +03:00
Nikolay Krasko 6a72cebe88 Add indent before colon of super types list on new line (KT-13981, KT-5117)
#KT-13981 Fixed
 #KT-5117 Fixed

(cherry picked from commit dfea3af)
2016-10-17 15:16:48 +03:00
Kirill Rakhman 926deebff5 Format spaces around !is and !in (KT-13314)
#KT-13314 Fixed
2016-08-15 16:21:01 +03:00
Kirill Rakhman 0320bd8184 Formatter: Remove spaces before question mark in nullable types (KT-12830)
#KT-12830 Fixed
2016-06-29 16:15:59 +03:00
Nikolay Krasko f8196d8331 Add space after a semicolon only if there's another child at the same line 2016-06-21 21:54:50 +03:00
Kirill Rakhman b560aab06d Format spaces before enum arguments
Fixes #KT-12714
2016-06-21 21:54:50 +03:00
Kirill Rakhman a520be5509 Format spaces around semicolon
Fixes #KT-12689
2016-06-21 21:54:50 +03:00
Kirill Rakhman db387bd573 Format spaces after annotation in annotated expression
Fixes #KT-12781
2016-06-21 21:54:50 +03:00
Kirill Rakhman ae83330679 Format spaces inside curly braces in string template
Fixes #KT-12791
2016-06-21 21:54:50 +03:00
Kirill Rakhman 655fc45a87 Format spaces around in keyword
Fixes: KT-10680
2016-06-21 21:54:50 +03:00
Kirill Rakhman 5c68681f96 Formatter: handle spaces before value arguments list (KT-12634)
#KT-12634 Fixed
2016-06-07 19:11:28 +03:00
Kirill Rakhman c24960f8d9 Formatter: handle spaces between class name and type parameters (#875)
Fixes #KT-12446
2016-06-01 21:20:56 +03:00
Kirill Rakhman 93ebb3da65 Formatter: handle spaces around 'is' keyword (#874)
Fixes #KT-12548
2016-05-30 20:35:33 +03:00
Nikolay Krasko b107bc401c Formatter: Don't enforce empty line between secondary constructors without body (KT-12175)
#KT-12175 Fixed
2016-05-12 17:26:54 +03:00
Kirill 6e08f06bfd Format spaces in infix call (KT-12018)
#KT-12018 Fixed
2016-04-26 15:21:33 +03:00
Kirill 01b754b318 Format spaces in cast expression (KT-12035)
#KT-12035 Fixed
2016-04-26 15:21:33 +03:00
Nikolay Krasko f2a17bc4c2 Formatter doesn't handle space before angle bracket in method definition (KT-11961)
#KT-11961 Fixed
2016-04-19 21:28:00 +03:00
Kirill Rakhman 146dca2cd6 Formatter: Remove spaces between expression and parentheses
#KT-11476 Fixed
2016-03-21 17:56:04 +03:00
Nikolay Krasko ee50aec734 Don't add a blank line between one line class and object (KT-10965) 2016-03-16 18:41:28 +03:00
Nikolay Krasko 94e8ba7c4b "Code formatter doesn't remove spaces in single line properties" fixed (KT-11076)
#KT-11076 Fixed
2016-03-16 12:38:26 +03:00
Nikolay Krasko 6193987d0d Reformat code should not align comments (KT-4175)
#KT-4175 In Progress
2016-03-16 12:38:17 +03:00
Alexey Sedunov 5dcf531048 Formatter: Leave single space between val/var and value parameter 2015-12-25 18:50:52 +03:00
Nikolay Krasko 8a95f23a23 Adjust formatting for FILE_ANNOTATION_LIST 2015-12-09 16:01:56 +03:00
Alexey Sedunov 40f2a983cc Formatter: Spacing before after semicolon in enum classes 2015-10-24 19:50:51 +03:00
Valentin Kipyatkov 090ea37a32 Fixed test data to use only annotation syntax with @ 2015-10-15 19:20:08 +03:00
Dmitry Jemerov 1523d5bcbf removing static type assertions work in progress 2015-10-12 11:11:23 +02:00
Dmitry Jemerov 4b92bd100c add space between property type parameter list and property name 2015-10-06 16:20:48 +02:00
Denis Zharkov 73799e2c3c Replace deprecated lambda syntax in testData
It's done with similar constructions where possible trying to preserve
intended behavior.
Some usages are removed because they test exactly the feature that
we are going to drop soon.
2015-09-25 08:29:25 +03:00
Natalia Ukhorskaya ba48a5b7fc Formatter: space between type argument list and function literal argument 2015-08-24 12:37:33 +03:00
Mikhail Glukhikh 3f14e74b08 Drop old enum syntax. Comma / semicolon are now a syntactic part of enum entry.
Comma must present now between enum entries, semicolon between last entry & first member, constructor calls must be without colons / specifiers.
A swarm of tests fixed accordingly.
2015-08-11 10:38:10 +03:00
Mikhail Glukhikh 022e7d1169 Deprecated enum syntax removed: most idea tests 2015-08-10 16:24:16 +03:00
Alexey Sedunov d23da408a8 Formatter: Add blank line before class/object declaration inside of declaration body 2015-07-28 18:48:23 +03:00
Denis Zharkov c9f79c2d05 Adjust testData: get rid of obsolete annotations 2015-06-12 09:23:31 +03:00
Valentin Kipyatkov 8fd6a64be9 Refactored methods for val/var in PSI 2015-06-01 18:23:34 +03:00
Denis Zharkov b650753643 Change formatting of function expressions without names
No spaces between 'fun' and value parameter list
2015-05-20 09:24:56 +03:00
Denis Zharkov 46a6cab671 Formatter: no spaces after 'constructor' inside primary ctor 2015-05-20 09:24:55 +03:00
Mikhail Glukhikh 1a312140e9 New enum syntax: Short constructor syntax introduced for entries, optional commas between entries, semicolon after entries. #KT-7605 Fixed.
Grammar changed accordingly.
Semicolons prohibited after an entry except the last one.
Only one initializer is allowed per entry.
EnumReferenceExpression AST node introduced.
Some tests fixed, a pair of new tests written. Kotlin code inside project fixed.
Formatter and intendation tests fixed accordingly.
Stub version is incremented.
2015-05-15 16:13:32 +03:00
Mikhail Glukhikh cf741cb868 Enum parsing changed: first entries, then members. Grammar fixed accordingly.
A set of compiler tests and some plugin tests changed accordingly.
Compiler Kotlin code changed accordingly.
2015-05-15 16:13:27 +03:00
Dmitry Jemerov 625096466e IDE testdata: s/trait/interface 2015-05-13 16:13:13 +02:00
Denis Zharkov b13e932c3c Parse label reference with spaces before '@'
But still report error
2015-05-07 22:36:15 +03:00
Dmitry Jemerov f93eeeb563 fix tests by adding missing 'init' keywords to testdata 2015-04-29 14:07:05 +02:00
Denis Zharkov 44a55e5bf6 Adjust testData to new labels syntax 2015-04-29 14:03:11 +03:00