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

Side by Side Diff: pkg/analyzer/test/services/data/style_guide_tests.data

Issue 322483002: Formatter: do not use a space when using < and > for a map literal. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/services/formatter_impl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 >>> DO use ; instead of {} for empty constructor bodies 1 >>> DO use ; instead of {} for empty constructor bodies
2 class Point { 2 class Point {
3 int x, y; 3 int x, y;
4 Point(this.x, this.y) {} 4 Point(this.x, this.y) {}
5 } 5 }
6 <<< 6 <<<
7 class Point { 7 class Point {
8 int x, y; 8 int x, y;
9 Point(this.x, this.y); 9 Point(this.x, this.y);
10 } 10 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 try { 147 try {
148 flow(); 148 flow();
149 } catch (e) { 149 } catch (e) {
150 print(e); 150 print(e);
151 } 151 }
152 } 152 }
153 >>> DON'T use a space after (, [, and {, or before ), ], and }. 153 >>> DON'T use a space after (, [, and {, or before ), ], and }.
154 spaces() { 154 spaces() {
155 var numbers = <int> [ 1, 2,( 3+4 ) ]; 155 var numbers = <int> [ 1, 2,( 3+4 ) ];
156 var mapLiteral = <int, int> {};
156 } 157 }
157 <<< 158 <<<
158 spaces() { 159 spaces() {
159 var numbers = <int>[1, 2, (3 + 4)]; 160 var numbers = <int>[1, 2, (3 + 4)];
161 var mapLiteral = <int, int>{};
160 } 162 }
161 >>> DO use a space before { in function and method bodies. 163 >>> DO use a space before { in function and method bodies.
162 getEmptyFn(a){ 164 getEmptyFn(a){
163 return (){}; 165 return (){};
164 } 166 }
165 <<< 167 <<<
166 getEmptyFn(a) { 168 getEmptyFn(a) {
167 return () {}; 169 return () {};
168 } 170 }
169 >>> DO format constructor initialization lists with each field on its own line. 171 >>> DO format constructor initialization lists with each field on its own line.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 217 }
216 } 218 }
217 >>> DO use four spaces for method cascades 219 >>> DO use four spaces for method cascades
218 var list = new List() 220 var list = new List()
219 ..addAll([1, 2, 3]) 221 ..addAll([1, 2, 3])
220 ..addAll([4, 5, 6]); 222 ..addAll([4, 5, 6]);
221 <<< 223 <<<
222 var list = new List() 224 var list = new List()
223 ..addAll([1, 2, 3]) 225 ..addAll([1, 2, 3])
224 ..addAll([4, 5, 6]); 226 ..addAll([4, 5, 6]);
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/services/formatter_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698