Skip to content

Commit ca3320e

Browse files
DanTupcommit-bot@chromium.org
authored andcommitted
Tweak LSP JSON validation error messages
Change-Id: I732d0020a68256632ee8ba823a0a31eb4a5360d3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105586 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
1 parent 972ea07 commit ca3320e

5 files changed

Lines changed: 356 additions & 355 deletions

File tree

pkg/analysis_server/lib/lsp_protocol/protocol_custom_generated.dart

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ class AnalyzerStatusParams implements ToJsonable {
5252
reporter.push('isAnalyzing');
5353
try {
5454
if (!obj.containsKey('isAnalyzing')) {
55-
reporter.reportError("may not be undefined");
55+
reporter.reportError("must not be undefined");
5656
return false;
5757
}
5858
if (obj['isAnalyzing'] == null) {
59-
reporter.reportError("may not be null");
59+
reporter.reportError("must not be null");
6060
return false;
6161
}
6262
if (obj['isAnalyzing'] != null && !(obj['isAnalyzing'] is bool)) {
@@ -125,11 +125,11 @@ class ClosingLabel implements ToJsonable {
125125
reporter.push('range');
126126
try {
127127
if (!obj.containsKey('range')) {
128-
reporter.reportError("may not be undefined");
128+
reporter.reportError("must not be undefined");
129129
return false;
130130
}
131131
if (obj['range'] == null) {
132-
reporter.reportError("may not be null");
132+
reporter.reportError("must not be null");
133133
return false;
134134
}
135135
if (obj['range'] != null && !(Range.canParse(obj['range'], reporter))) {
@@ -142,11 +142,11 @@ class ClosingLabel implements ToJsonable {
142142
reporter.push('label');
143143
try {
144144
if (!obj.containsKey('label')) {
145-
reporter.reportError("may not be undefined");
145+
reporter.reportError("must not be undefined");
146146
return false;
147147
}
148148
if (obj['label'] == null) {
149-
reporter.reportError("may not be null");
149+
reporter.reportError("must not be null");
150150
return false;
151151
}
152152
if (obj['label'] != null && !(obj['label'] is String)) {
@@ -246,11 +246,11 @@ class CompletionItemResolutionInfo implements ToJsonable {
246246
reporter.push('file');
247247
try {
248248
if (!obj.containsKey('file')) {
249-
reporter.reportError("may not be undefined");
249+
reporter.reportError("must not be undefined");
250250
return false;
251251
}
252252
if (obj['file'] == null) {
253-
reporter.reportError("may not be null");
253+
reporter.reportError("must not be null");
254254
return false;
255255
}
256256
if (obj['file'] != null && !(obj['file'] is String)) {
@@ -263,11 +263,11 @@ class CompletionItemResolutionInfo implements ToJsonable {
263263
reporter.push('offset');
264264
try {
265265
if (!obj.containsKey('offset')) {
266-
reporter.reportError("may not be undefined");
266+
reporter.reportError("must not be undefined");
267267
return false;
268268
}
269269
if (obj['offset'] == null) {
270-
reporter.reportError("may not be null");
270+
reporter.reportError("must not be null");
271271
return false;
272272
}
273273
if (obj['offset'] != null && !(obj['offset'] is num)) {
@@ -280,11 +280,11 @@ class CompletionItemResolutionInfo implements ToJsonable {
280280
reporter.push('libId');
281281
try {
282282
if (!obj.containsKey('libId')) {
283-
reporter.reportError("may not be undefined");
283+
reporter.reportError("must not be undefined");
284284
return false;
285285
}
286286
if (obj['libId'] == null) {
287-
reporter.reportError("may not be null");
287+
reporter.reportError("must not be null");
288288
return false;
289289
}
290290
if (obj['libId'] != null && !(obj['libId'] is num)) {
@@ -297,11 +297,11 @@ class CompletionItemResolutionInfo implements ToJsonable {
297297
reporter.push('displayUri');
298298
try {
299299
if (!obj.containsKey('displayUri')) {
300-
reporter.reportError("may not be undefined");
300+
reporter.reportError("must not be undefined");
301301
return false;
302302
}
303303
if (obj['displayUri'] == null) {
304-
reporter.reportError("may not be null");
304+
reporter.reportError("must not be null");
305305
return false;
306306
}
307307
if (obj['displayUri'] != null && !(obj['displayUri'] is String)) {
@@ -314,11 +314,11 @@ class CompletionItemResolutionInfo implements ToJsonable {
314314
reporter.push('rOffset');
315315
try {
316316
if (!obj.containsKey('rOffset')) {
317-
reporter.reportError("may not be undefined");
317+
reporter.reportError("must not be undefined");
318318
return false;
319319
}
320320
if (obj['rOffset'] == null) {
321-
reporter.reportError("may not be null");
321+
reporter.reportError("must not be null");
322322
return false;
323323
}
324324
if (obj['rOffset'] != null && !(obj['rOffset'] is num)) {
@@ -331,11 +331,11 @@ class CompletionItemResolutionInfo implements ToJsonable {
331331
reporter.push('rLength');
332332
try {
333333
if (!obj.containsKey('rLength')) {
334-
reporter.reportError("may not be undefined");
334+
reporter.reportError("must not be undefined");
335335
return false;
336336
}
337337
if (obj['rLength'] == null) {
338-
reporter.reportError("may not be null");
338+
reporter.reportError("must not be null");
339339
return false;
340340
}
341341
if (obj['rLength'] != null && !(obj['rLength'] is num)) {
@@ -409,11 +409,11 @@ class DartDiagnosticServer implements ToJsonable {
409409
reporter.push('port');
410410
try {
411411
if (!obj.containsKey('port')) {
412-
reporter.reportError("may not be undefined");
412+
reporter.reportError("must not be undefined");
413413
return false;
414414
}
415415
if (obj['port'] == null) {
416-
reporter.reportError("may not be null");
416+
reporter.reportError("must not be null");
417417
return false;
418418
}
419419
if (obj['port'] != null && !(obj['port'] is num)) {
@@ -485,11 +485,11 @@ class PublishClosingLabelsParams implements ToJsonable {
485485
reporter.push('uri');
486486
try {
487487
if (!obj.containsKey('uri')) {
488-
reporter.reportError("may not be undefined");
488+
reporter.reportError("must not be undefined");
489489
return false;
490490
}
491491
if (obj['uri'] == null) {
492-
reporter.reportError("may not be null");
492+
reporter.reportError("must not be null");
493493
return false;
494494
}
495495
if (obj['uri'] != null && !(obj['uri'] is String)) {
@@ -502,11 +502,11 @@ class PublishClosingLabelsParams implements ToJsonable {
502502
reporter.push('labels');
503503
try {
504504
if (!obj.containsKey('labels')) {
505-
reporter.reportError("may not be undefined");
505+
reporter.reportError("must not be undefined");
506506
return false;
507507
}
508508
if (obj['labels'] == null) {
509-
reporter.reportError("may not be null");
509+
reporter.reportError("must not be null");
510510
return false;
511511
}
512512
if (obj['labels'] != null &&

0 commit comments

Comments
 (0)