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

Side by Side Diff: pkg/dart_messages/lib/generated/shared_messages.json

Issue 1711863005: Split the JSON output into multiple lines. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Ues JsonEncoder.withIndent. Created 4 years, 10 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
1 {"exampleMessage":{"id":"use an Id generated by bin/message_id.dart","subId":0," category":"AnalysisOptionsError","template":"#use #named #arguments","templateHo leOrder":["arguments","named","use"],"howToFix":"an explanation on how to fix th ings","options":null,"usedBy":[],"examples":[" Some multiline example;\n That generates the bug.",{"fileA.dart":" or a map from file to content .\n again multiline","fileB.dart":" with possibly multiple files.\ n muliline too"}]},"CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY":{"id":"LGJGHW ","subId":0,"category":"ParserError","template":"Const constructor or factory ca n't have a body.","templateHoleOrder":null,"howToFix":"Remove the 'const' keywor d or the body.","options":null,"usedBy":["Platform.dart2js"],"examples":[" class C {\n const C() {}\n }\n\n main() => new C(); "," class C {\n const factory C() {}\n }\n\n m ain() => new C();"]},"CONST_CONSTRUCTOR_WITH_BODY":{"id":"LGJGHW","subId":1,"cat egory":"ParserError","template":"Const constructor can't have a body.","template HoleOrder":null,"howToFix":"Try removing the 'const' keyword or the body.","opti ons":null,"usedBy":["Platform.analyzer"],"examples":[" class C {\n const C() {}\n }\n\n main() => new C();"]},"CONST_FACTORY": {"id":"LGJGHW","subId":2,"category":"ParserError","template":"Only redirecting f actory constructors can be declared to be 'const'.","templateHoleOrder":null,"ho wToFix":"Try removing the 'const' keyword or replacing the body with '=' followe d by a valid target.","options":null,"usedBy":["Platform.analyzer"],"examples":[ " class C {\n const factory C() {}\n }\n\n mai n() => new C();"]},"EXTRANEOUS_MODIFIER":{"id":"GRKIQE","subId":0,"category":"Pa rserError","template":"Can't have modifier '#{modifier}' here.","templateHoleOrd er":null,"howToFix":"Try removing '#{modifier}'.","options":null,"usedBy":["Plat form.dart2js"],"examples":["var String foo; main(){}","var set foo; main(){}","v ar final foo; main(){}","var var foo; main(){}","var const foo; main(){}","var a bstract foo; main(){}","var static foo; main(){}","var external foo; main(){}"," get var foo; main(){}","set var foo; main(){}","final var foo; main(){}","var va r foo; main(){}","const var foo; main(){}","abstract var foo; main(){}","static var foo; main(){}","external var foo; main(){}"]},"EXTRANEOUS_MODIFIER_REPLACE": {"id":"GRKIQE","subId":1,"category":"ParserError","template":"Can't have modifie r '#{modifier}' here.","templateHoleOrder":null,"howToFix":"Try replacing modifi er '#{modifier}' with 'var', 'final', or a type.","options":null,"usedBy":["Plat form.dart2js"],"examples":["set foo; main(){}","abstract foo; main(){}","static foo; main(){}","external foo; main(){}"]},"CONST_CLASS":{"id":"GRKIQE","subId":2 ,"category":"ParserError","template":"Classes can't be declared to be 'const'"," templateHoleOrder":null,"howToFix":"Try removing the 'const' keyword or moving t o the class' constructor(s).","options":null,"usedBy":["Platform.analyzer"],"exa mples":[" const class C {}\n\n main() => new C();\n "]},"CO NST_METHOD":{"id":"GRKIQE","subId":3,"category":"ParserError","template":"Getter s, setters and methods can't be declared to be 'const'","templateHoleOrder":null ,"howToFix":"Try removing the 'const' keyword.","options":null,"usedBy":["Platfo rm.analyzer"],"examples":["const int foo() => 499; main() {}","const int get foo => 499; main() {}","const set foo(v) => 499; main() {}","class A { const int fo o() => 499; } main() { new A(); }","class A { const int get foo => 499; } main() { new A(); }","class A { const set foo(v) => 499; } main() { new A(); }"]},"CON ST_ENUM":{"id":"GRKIQE","subId":4,"category":"ParserError","template":"Enums can 't be declared to be 'const'","templateHoleOrder":null,"howToFix":"Try removing the 'const' keyword.","options":null,"usedBy":["Platform.analyzer"],"examples":[ "const enum Foo { x } main() {}"]},"CONST_TYPEDEF":{"id":"GRKIQE","subId":5,"cat egory":"ParserError","template":"Type aliases can't be declared to be 'const'"," templateHoleOrder":null,"howToFix":"Try removing the 'const' keyword.","options" :null,"usedBy":["Platform.analyzer"],"examples":["const typedef void Foo(); main () {}"]},"CONST_AND_FINAL":{"id":"GRKIQE","subId":6,"category":"ParserError","te mplate":"Members can't be declared to be both 'const' and 'final'","templateHole Order":null,"howToFix":"Try removing either the 'const' or 'final' keyword.","op tions":null,"usedBy":["Platform.analyzer"],"examples":["final const int x = 499; main() {}","const final int x = 499; main() {}","class A { static final const i nt x = 499; } main() {}","class A { static const final int x = 499; } main() {}" ]},"CONST_AND_VAR":{"id":"GRKIQE","subId":7,"category":"ParserError","template": "Members can't be declared to be both 'const' and 'var'","templateHoleOrder":nul l,"howToFix":"Try removing either the 'const' or 'var' keyword.","options":null, "usedBy":["Platform.analyzer"],"examples":["var const x = 499; main() {}","const var x = 499; main() {}","class A { var const x = 499; } main() {}","class A { c onst var x = 499; } main() {}"]},"CLASS_IN_CLASS":{"id":"DOTHQH","subId":0,"cate gory":"ParserError","template":"Classes can't be declared inside other classes." ,"templateHoleOrder":null,"howToFix":"Try moving the class to the top-level.","o ptions":null,"usedBy":["Platform.analyzer"],"examples":["class A { class B {} } main() { new A(); }"]},"CONSTRUCTOR_WITH_RETURN_TYPE":{"id":"VOJBWY","subId":0," category":"ParserError","template":"Constructors can't have a return type","temp lateHoleOrder":null,"howToFix":"Try removing the return type.","options":null,"u sedBy":["Platform.analyzer","Platform.dart2js"],"examples":["class A { int A() { } } main() { new A(); }"]},"RETURN_IN_GENERATIVE_CONSTRUCTOR":{"id":"UOTDQH","su bId":0,"category":"CompileTimeError","template":"Constructors can't return value s.","templateHoleOrder":null,"howToFix":"Try removing the return statement or us ing a factory constructor.","options":null,"usedBy":["Platform.analyzer","Platfo rm.dart2js"],"examples":[" class C {\n C() {\n return 1;\n }\n }\n\n main() => new C();"]},"RETURN_IN_GENERATO R":{"id":"JRUTUQ","subId":0,"category":"CompileTimeError","template":"Can't retu rn a value from a generator function (using the '#{modifier}' modifier).","templ ateHoleOrder":null,"howToFix":"Try removing the value, replacing 'return' with ' yield' or changing the method body modifier","options":null,"usedBy":["Platform. analyzer","Platform.dart2js"],"examples":[" foo() async* { return 0; }\n main() => foo();\n "," foo() sync* { return 0; }\n m ain() => foo();\n "]}} 1 {
2 "exampleMessage": {
3 "id": "use an Id generated by bin/message_id.dart",
4 "subId": 0,
5 "category": "AnalysisOptionsError",
6 "template": "#use #named #arguments",
7 "templateHoleOrder": [
8 "arguments",
9 "named",
10 "use"
11 ],
12 "howToFix": "an explanation on how to fix things",
13 "options": null,
14 "usedBy": [],
15 "examples": [
16 " Some multiline example;\n That generates the bug.",
17 {
18 "fileA.dart": " or a map from file to content.\n again mul tiline",
19 "fileB.dart": " with possibly multiple files.\n muliline t oo"
20 }
21 ]
22 },
23 "CONST_CONSTRUCTOR_OR_FACTORY_WITH_BODY": {
24 "id": "LGJGHW",
25 "subId": 0,
26 "category": "ParserError",
27 "template": "Const constructor or factory can't have a body.",
28 "templateHoleOrder": null,
29 "howToFix": "Remove the 'const' keyword or the body.",
30 "options": null,
31 "usedBy": [
32 "Platform.dart2js"
33 ],
34 "examples": [
35 " class C {\n const C() {}\n }\n\n main( ) => new C();",
36 " class C {\n const factory C() {}\n }\n\n main() => new C();"
37 ]
38 },
39 "CONST_CONSTRUCTOR_WITH_BODY": {
40 "id": "LGJGHW",
41 "subId": 1,
42 "category": "ParserError",
43 "template": "Const constructor can't have a body.",
44 "templateHoleOrder": null,
45 "howToFix": "Try removing the 'const' keyword or the body.",
46 "options": null,
47 "usedBy": [
48 "Platform.analyzer"
49 ],
50 "examples": [
51 " class C {\n const C() {}\n }\n\n main( ) => new C();"
52 ]
53 },
54 "CONST_FACTORY": {
55 "id": "LGJGHW",
56 "subId": 2,
57 "category": "ParserError",
58 "template": "Only redirecting factory constructors can be declared to be 'co nst'.",
59 "templateHoleOrder": null,
60 "howToFix": "Try removing the 'const' keyword or replacing the body with '=' followed by a valid target.",
61 "options": null,
62 "usedBy": [
63 "Platform.analyzer"
64 ],
65 "examples": [
66 " class C {\n const factory C() {}\n }\n\n main() => new C();"
67 ]
68 },
69 "EXTRANEOUS_MODIFIER": {
70 "id": "GRKIQE",
71 "subId": 0,
72 "category": "ParserError",
73 "template": "Can't have modifier '#{modifier}' here.",
74 "templateHoleOrder": null,
75 "howToFix": "Try removing '#{modifier}'.",
76 "options": null,
77 "usedBy": [
78 "Platform.dart2js"
79 ],
80 "examples": [
81 "var String foo; main(){}",
82 "var set foo; main(){}",
83 "var final foo; main(){}",
84 "var var foo; main(){}",
85 "var const foo; main(){}",
86 "var abstract foo; main(){}",
87 "var static foo; main(){}",
88 "var external foo; main(){}",
89 "get var foo; main(){}",
90 "set var foo; main(){}",
91 "final var foo; main(){}",
92 "var var foo; main(){}",
93 "const var foo; main(){}",
94 "abstract var foo; main(){}",
95 "static var foo; main(){}",
96 "external var foo; main(){}"
97 ]
98 },
99 "EXTRANEOUS_MODIFIER_REPLACE": {
100 "id": "GRKIQE",
101 "subId": 1,
102 "category": "ParserError",
103 "template": "Can't have modifier '#{modifier}' here.",
104 "templateHoleOrder": null,
105 "howToFix": "Try replacing modifier '#{modifier}' with 'var', 'final', or a type.",
106 "options": null,
107 "usedBy": [
108 "Platform.dart2js"
109 ],
110 "examples": [
111 "set foo; main(){}",
112 "abstract foo; main(){}",
113 "static foo; main(){}",
114 "external foo; main(){}"
115 ]
116 },
117 "CONST_CLASS": {
118 "id": "GRKIQE",
119 "subId": 2,
120 "category": "ParserError",
121 "template": "Classes can't be declared to be 'const'",
122 "templateHoleOrder": null,
123 "howToFix": "Try removing the 'const' keyword or moving to the class' constr uctor(s).",
124 "options": null,
125 "usedBy": [
126 "Platform.analyzer"
127 ],
128 "examples": [
129 " const class C {}\n\n main() => new C();\n "
130 ]
131 },
132 "CONST_METHOD": {
133 "id": "GRKIQE",
134 "subId": 3,
135 "category": "ParserError",
136 "template": "Getters, setters and methods can't be declared to be 'const'",
137 "templateHoleOrder": null,
138 "howToFix": "Try removing the 'const' keyword.",
139 "options": null,
140 "usedBy": [
141 "Platform.analyzer"
142 ],
143 "examples": [
144 "const int foo() => 499; main() {}",
145 "const int get foo => 499; main() {}",
146 "const set foo(v) => 499; main() {}",
147 "class A { const int foo() => 499; } main() { new A(); }",
148 "class A { const int get foo => 499; } main() { new A(); }",
149 "class A { const set foo(v) => 499; } main() { new A(); }"
150 ]
151 },
152 "CONST_ENUM": {
153 "id": "GRKIQE",
154 "subId": 4,
155 "category": "ParserError",
156 "template": "Enums can't be declared to be 'const'",
157 "templateHoleOrder": null,
158 "howToFix": "Try removing the 'const' keyword.",
159 "options": null,
160 "usedBy": [
161 "Platform.analyzer"
162 ],
163 "examples": [
164 "const enum Foo { x } main() {}"
165 ]
166 },
167 "CONST_TYPEDEF": {
168 "id": "GRKIQE",
169 "subId": 5,
170 "category": "ParserError",
171 "template": "Type aliases can't be declared to be 'const'",
172 "templateHoleOrder": null,
173 "howToFix": "Try removing the 'const' keyword.",
174 "options": null,
175 "usedBy": [
176 "Platform.analyzer"
177 ],
178 "examples": [
179 "const typedef void Foo(); main() {}"
180 ]
181 },
182 "CONST_AND_FINAL": {
183 "id": "GRKIQE",
184 "subId": 6,
185 "category": "ParserError",
186 "template": "Members can't be declared to be both 'const' and 'final'",
187 "templateHoleOrder": null,
188 "howToFix": "Try removing either the 'const' or 'final' keyword.",
189 "options": null,
190 "usedBy": [
191 "Platform.analyzer"
192 ],
193 "examples": [
194 "final const int x = 499; main() {}",
195 "const final int x = 499; main() {}",
196 "class A { static final const int x = 499; } main() {}",
197 "class A { static const final int x = 499; } main() {}"
198 ]
199 },
200 "CONST_AND_VAR": {
201 "id": "GRKIQE",
202 "subId": 7,
203 "category": "ParserError",
204 "template": "Members can't be declared to be both 'const' and 'var'",
205 "templateHoleOrder": null,
206 "howToFix": "Try removing either the 'const' or 'var' keyword.",
207 "options": null,
208 "usedBy": [
209 "Platform.analyzer"
210 ],
211 "examples": [
212 "var const x = 499; main() {}",
213 "const var x = 499; main() {}",
214 "class A { var const x = 499; } main() {}",
215 "class A { const var x = 499; } main() {}"
216 ]
217 },
218 "CLASS_IN_CLASS": {
219 "id": "DOTHQH",
220 "subId": 0,
221 "category": "ParserError",
222 "template": "Classes can't be declared inside other classes.",
223 "templateHoleOrder": null,
224 "howToFix": "Try moving the class to the top-level.",
225 "options": null,
226 "usedBy": [
227 "Platform.analyzer"
228 ],
229 "examples": [
230 "class A { class B {} } main() { new A(); }"
231 ]
232 },
233 "CONSTRUCTOR_WITH_RETURN_TYPE": {
234 "id": "VOJBWY",
235 "subId": 0,
236 "category": "ParserError",
237 "template": "Constructors can't have a return type",
238 "templateHoleOrder": null,
239 "howToFix": "Try removing the return type.",
240 "options": null,
241 "usedBy": [
242 "Platform.analyzer",
243 "Platform.dart2js"
244 ],
245 "examples": [
246 "class A { int A() {} } main() { new A(); }"
247 ]
248 },
249 "MISSING_EXPRESSION_IN_THROW": {
250 "id": "FTGGMJ",
251 "subId": 0,
252 "category": "ParserError",
253 "template": "Throw expressions must compute the object to be thrown.",
254 "templateHoleOrder": null,
255 "howToFix": "Did you mean 'rethrow'?",
256 "options": null,
257 "usedBy": [
258 "Platform.analyzer",
259 "Platform.dart2js"
260 ],
261 "examples": [
262 "main() { throw; }",
263 "main() { try { throw 0; } catch(e) { throw; } }"
264 ]
265 },
266 "RETHROW_OUTSIDE_CATCH": {
267 "id": "MWETLC",
268 "subId": 0,
269 "category": "CompileTimeError",
270 "template": "Rethrow must be inside of catch clause",
271 "templateHoleOrder": null,
272 "howToFix": "Try moving the expression into a catch clause, or using a 'thro w' expression.",
273 "options": null,
274 "usedBy": [
275 "Platform.analyzer",
276 "Platform.dart2js"
277 ],
278 "examples": [
279 "main() { rethrow; }"
280 ]
281 },
282 "RETURN_IN_GENERATIVE_CONSTRUCTOR": {
283 "id": "UOTDQH",
284 "subId": 0,
285 "category": "CompileTimeError",
286 "template": "Constructors can't return values.",
287 "templateHoleOrder": null,
288 "howToFix": "Try removing the return statement or using a factory constructo r.",
289 "options": null,
290 "usedBy": [
291 "Platform.analyzer",
292 "Platform.dart2js"
293 ],
294 "examples": [
295 " class C {\n C() {\n return 1;\n }\n }\n\n main() => new C();"
296 ]
297 },
298 "RETURN_IN_GENERATOR": {
299 "id": "JRUTUQ",
300 "subId": 0,
301 "category": "CompileTimeError",
302 "template": "Can't return a value from a generator function (using the '#{mo difier}' modifier).",
303 "templateHoleOrder": null,
304 "howToFix": "Try removing the value, replacing 'return' with 'yield' or chan ging the method body modifier",
305 "options": null,
306 "usedBy": [
307 "Platform.analyzer",
308 "Platform.dart2js"
309 ],
310 "examples": [
311 " foo() async* { return 0; }\n main() => foo();\n ",
312 " foo() sync* { return 0; }\n main() => foo();\n "
313 ]
314 }
315 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/dart_messages/lib/shared_messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698