Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: packages/dart_style/test/splitting/map_arguments.stmt

Issue 1400473008: Roll Observatory packages and add a roll script (Closed) Base URL: git@github.com:dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 40 columns |
2 >>> args before and after map forces nesting
3 method(first,{key: value, otherKey: otherLongValue},third);
4 <<<
5 method(
6 first,
7 {
8 key: value,
9 otherKey: otherLongValue
10 },
11 third);
12 >>> nothing but map args does not nest
13 longFunctionName({key: value, otherKey: otherLongValue},
14 {key: value, otherKey: otherLongValue}, {key: value, otherKey: otherLongValue});
15 <<<
16 longFunctionName({
17 key: value,
18 otherKey: otherLongValue
19 }, {
20 key: value,
21 otherKey: otherLongValue
22 }, {
23 key: value,
24 otherKey: otherLongValue
25 });
26 >>> trailing maps do not nest
27 longFunctionName(argument, argument, argument, argument,
28 {key: value, otherKey: otherLongValue}, {key: value, otherKey: otherLongValue});
29 <<<
30 longFunctionName(argument, argument,
31 argument, argument, {
32 key: value,
33 otherKey: otherLongValue
34 }, {
35 key: value,
36 otherKey: otherLongValue
37 });
38 >>> leading maps do not nest
39 longFunctionName({key: value, otherKey: otherLongValue},
40 {key: value, otherKey: otherLongValue}, argument, argument, argument, argument);
41 <<<
42 longFunctionName({
43 key: value,
44 otherKey: otherLongValue
45 }, {
46 key: value,
47 otherKey: otherLongValue
48 }, argument, argument, argument,
49 argument);
50 >>> arg between maps forces nesting
51 longFunctionName({key: value, otherKey: otherLongValue}, argument,
52 {key: value, otherKey: otherLongValue});
53 <<<
54 longFunctionName(
55 {
56 key: value,
57 otherKey: otherLongValue
58 },
59 argument,
60 {
61 key: value,
62 otherKey: otherLongValue
63 });
64 >>> unsplit leading args
65 longFunctionName(arg, arg, {key: value, otherKey: otherLongValue});
66 <<<
67 longFunctionName(arg, arg, {
68 key: value,
69 otherKey: otherLongValue
70 });
71 >>> split before leading args
72 longFunctionName(argument, argument, argument, {key: value, otherKey: otherLongV alue});
73 <<<
74 longFunctionName(
75 argument, argument, argument, {
76 key: value,
77 otherKey: otherLongValue
78 });
79 >>> split in middle of leading args
80 longFunctionName(argument, argument, argument, argument,
81 {key: value, otherKey: otherLongValue});
82 <<<
83 longFunctionName(argument, argument,
84 argument, argument, {
85 key: value,
86 otherKey: otherLongValue
87 });
88 >>> split before all leading args
89 longFunctionName(argument, argument, argument, argument, argument, argument,
90 {key: value, otherKey: otherLongValue});
91 <<<
92 longFunctionName(
93 argument,
94 argument,
95 argument,
96 argument,
97 argument,
98 argument, {
99 key: value,
100 otherKey: otherLongValue
101 });
102 >>> unsplit trailing args
103 longFunctionName({key: value, otherKey: otherLongValue}, argument, argument);
104 <<<
105 longFunctionName({
106 key: value,
107 otherKey: otherLongValue
108 }, argument, argument);
109 >>> split before trailing args
110 longFunctionName({key: value, otherKey: otherValue} /* very very long comment */ ,
111 argument, argument);
112 <<<
113 longFunctionName({
114 key: value,
115 otherKey: otherValue
116 } /* very very long comment */,
117 argument, argument);
118 >>> split in middle of trailing args
119 longFunctionName({key: value, otherKey: otherLongValue}, argument, argument, arg ument, argument);
120 <<<
121 longFunctionName({
122 key: value,
123 otherKey: otherLongValue
124 }, argument, argument, argument,
125 argument);
126 >>> split before all trailing args
127 longFunctionName({key: value, otherKey: otherLongValue}, argument, argument, arg ument, argument,
128 argument, argument, argument);
129 <<<
130 longFunctionName({
131 key: value,
132 otherKey: otherLongValue
133 },
134 argument,
135 argument,
136 argument,
137 argument,
138 argument,
139 argument,
140 argument);
141 >>> don't split leading maps
142 longFunctionName({k: v}, {k: v2}, a);
143 <<<
144 longFunctionName({k: v}, {k: v2}, a);
145 >>> split before all args including leading
146 longFunctionName({k: v}, {k: v2}, argument);
147 <<<
148 longFunctionName(
149 {k: v}, {k: v2}, argument);
150 >>> split before one leading arg
151 longFunctionName({key: value}, {key: value}, argument);
152 <<<
153 longFunctionName({key: value},
154 {key: value}, argument);
155 >>> split before all args including leading
156 longFunctionName({k: v}, {key: value}, {key: longerValue}, argument, argument,
157 argument, argument, argument, argument, argument);
158 <<<
159 longFunctionName(
160 {k: v},
161 {key: value},
162 {key: longerValue},
163 argument,
164 argument,
165 argument,
166 argument,
167 argument,
168 argument,
169 argument);
170 >>> don't split trailing maps
171 longFunctionName(a, {k: v}, {key: va});
172 <<<
173 longFunctionName(a, {k: v}, {key: va});
174 >>> split before all args including trailing
175 longFunctionName(argument, {k: v}, {key: va});
176 <<<
177 longFunctionName(
178 argument, {k: v}, {key: va});
179 >>> split before one trailing arg
180 longFunctionName(argument, {key: value}, {key: value});
181 <<<
182 longFunctionName(argument, {key: value},
183 {key: value});
184 >>> split before all args including trailing
185 longFunctionName(argument, argument, {k: v}, {key: value}, {key: longerValue});
186 <<<
187 longFunctionName(
188 argument,
189 argument,
190 {k: v},
191 {key: value},
192 {key: longerValue});
193 >>> don't nest because of nested 1-arg fn
194 outer(inner({key: value, otherKey: otherLongValue}));
195 <<<
196 outer(inner({
197 key: value,
198 otherKey: otherLongValue
199 }));
200 >>> do nest because of nested many-arg fn
201 outer(argument, inner({key: value, otherKey: otherLongValue}));
202 <<<
203 outer(
204 argument,
205 inner({
206 key: value,
207 otherKey: otherLongValue
208 }));
209 >>> don't nest because of nested 1-arg method call
210 obj.outer(obj.inner({key: value, otherKey: otherLongValue}));
211 <<<
212 obj.outer(obj.inner({
213 key: value,
214 otherKey: otherLongValue
215 }));
216 >>> do nest because of nested many-arg method call
217 obj.outer(argument, obj.inner({key: value, otherKey: otherLongValue}));
218 <<<
219 obj.outer(
220 argument,
221 obj.inner({
222 key: value,
223 otherKey: otherLongValue
224 }));
OLDNEW
« no previous file with comments | « packages/dart_style/test/splitting/loops.stmt ('k') | packages/dart_style/test/splitting/maps.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698