OLD | NEW |
1 40 columns | | 1 40 columns | |
2 >>> keeps map on one line if possible | 2 >>> keeps map on one line if possible |
3 sendPort.send({'type': 'error', 'error': 'oops'}); | 3 sendPort.send({'type': 'error', 'error': 'oops'}); |
4 <<< | 4 <<< |
5 sendPort.send( | 5 sendPort.send( |
6 {'type': 'error', 'error': 'oops'}); | 6 {'type': 'error', 'error': 'oops'}); |
7 >>> prefers to wrap before "." | 7 >>> prefers to wrap before "." |
8 new Future.sync(() => callback('msg')).then( | 8 new Future.sync(() => callback('msg')).then( |
9 (result) => replyTo.send()).catchError((error) {}); | 9 (result) => replyTo.send()).catchError((error) {}); |
10 <<< | 10 <<< |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 argument); | 47 argument); |
48 >>> function inside a collection | 48 >>> function inside a collection |
49 [item, obj.method(argument).method(argument).method(() {body;}).another().anothe
r()]; | 49 [item, obj.method(argument).method(argument).method(() {body;}).another().anothe
r()]; |
50 <<< | 50 <<< |
51 [ | 51 [ |
52 item, | 52 item, |
53 obj | 53 obj |
54 .method(argument) | 54 .method(argument) |
55 .method(argument) | 55 .method(argument) |
56 .method(() { | 56 .method(() { |
57 body; | 57 body; |
58 }).another().another() | 58 }) |
| 59 .another() |
| 60 .another() |
59 ]; | 61 ]; |
60 >>> function inside an argument list | 62 >>> function inside an argument list |
61 function(argument, obj.method(argument).method(argument).method(() {body;}).anot
her().another()); | 63 function(argument, obj.method(argument).method(argument).method(() {body;}).anot
her().another()); |
62 <<< | 64 <<< |
63 function( | 65 function( |
64 argument, | 66 argument, |
65 obj | 67 obj |
66 .method(argument) | 68 .method(argument) |
67 .method(argument) | 69 .method(argument) |
68 .method(() { | 70 .method(() { |
69 body; | 71 body; |
70 }).another().another()); | 72 }) |
| 73 .another() |
| 74 .another()); |
71 >>> unnested function inside nested expression | 75 >>> unnested function inside nested expression |
72 function(argument, function(() {;})); | 76 function(argument, function(() {;})); |
73 <<< | 77 <<< |
74 function(argument, function(() { | 78 function(argument, function(() { |
75 ; | 79 ; |
76 })); | 80 })); |
77 >>> nested function inside nested expression | 81 >>> nested function inside nested expression |
78 function(argument, function(() {;}, argument, () {;})); | 82 function(argument, function(() {;}, argument, () {;})); |
79 <<< | 83 <<< |
80 function( | 84 function( |
81 argument, | 85 argument, |
82 function( | 86 function( |
83 () { | 87 () { |
84 ; | 88 ; |
85 }, | 89 }, |
86 argument, | 90 argument, |
87 () { | 91 () { |
88 ; | 92 ; |
89 })); | 93 })); |
90 >>> wrap before => | 94 >>> wrap before => |
91 receiver.firstMethod().next((parameter) => longIdentifier == veryLongIdentifier)
; | 95 receiver.firstMethod().next((parameter) => longIdentifier == veryLongIdentifier)
; |
92 <<< | 96 <<< |
93 receiver.firstMethod().next( | 97 receiver.firstMethod().next( |
94 (parameter) => longIdentifier == | 98 (parameter) => |
| 99 longIdentifier == |
95 veryLongIdentifier); | 100 veryLongIdentifier); |
96 >>> wrap after => | 101 >>> wrap after => |
97 receiver.firstMethod().next(() => veryveryveryverylongIdentifier == veryLongIden
tifier); | 102 receiver.firstMethod().next(() => veryveryveryverylongIdentifier == veryLongIden
tifier); |
98 <<< | 103 <<< |
99 receiver.firstMethod().next(() => | 104 receiver.firstMethod().next(() => |
100 veryveryveryverylongIdentifier == | 105 veryveryveryverylongIdentifier == |
101 veryLongIdentifier); | 106 veryLongIdentifier); |
102 >>> wrap at nested binary operator | 107 >>> wrap at nested binary operator |
103 receiver.firstMethod().next(longIdentifier == veryLongIdentifier); | 108 receiver.firstMethod().next(longIdentifier == veryLongIdentifier); |
104 <<< | 109 <<< |
105 receiver.firstMethod().next( | 110 receiver.firstMethod().next( |
106 longIdentifier == | 111 longIdentifier == |
107 veryLongIdentifier); | 112 veryLongIdentifier); |
108 >>> list inside method chain | 113 >>> list inside method chain |
109 receiver.first([listItem, secondItem, thirdItem]).second(); | 114 receiver.first([listItem, secondItem, thirdItem]).second(); |
110 <<< | 115 <<< |
111 receiver.first([ | 116 receiver.first([ |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 veryLongIdentifier / | 191 veryLongIdentifier / |
187 veryLongIdentifier - | 192 veryLongIdentifier - |
188 veryLongIdentifier; | 193 veryLongIdentifier; |
189 >>> choose extra nesting if it leads to better solution | 194 >>> choose extra nesting if it leads to better solution |
190 longIdentifier + | 195 longIdentifier + |
191 (longIdentifier ? 0 : | 196 (longIdentifier ? 0 : |
192 1) == identifier; | 197 1) == identifier; |
193 <<< | 198 <<< |
194 longIdentifier + | 199 longIdentifier + |
195 (longIdentifier ? 0 : 1) == | 200 (longIdentifier ? 0 : 1) == |
196 identifier; | 201 identifier; |
| 202 >>> normal indent before unsplit binary operators in => body |
| 203 veryLongFunction() => extremelyLongArgument + argument; |
| 204 <<< |
| 205 veryLongFunction() => |
| 206 extremelyLongArgument + argument; |
| 207 >>> no extra indent before binary operators in => body |
| 208 veryLongFunction() => longArgument + longArgument + longArgument; |
| 209 <<< |
| 210 veryLongFunction() => |
| 211 longArgument + |
| 212 longArgument + |
| 213 longArgument; |
OLD | NEW |