mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[analyzer] Mark diagnostics as published and fix spelling mistakes
Change-Id: Ib9bc435b88611724cf0527d942990991ecf8d024 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319340 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
3c8fccf7a4
commit
401fa6130f
|
@ -323,6 +323,7 @@ class FfiCode extends AnalyzerErrorCode {
|
|||
"The return type of the function passed to 'NativeCallable.listener' must "
|
||||
"be 'void' rather than '{0}'.",
|
||||
correctionMessage: "Try changing the return type to 'void'.",
|
||||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
/// Parameters:
|
||||
|
|
|
@ -1308,6 +1308,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
'EMPTY_MAP_PATTERN',
|
||||
"A map pattern must have at least one entry.",
|
||||
correctionMessage: "Try replacing it with an object pattern 'Map()'.",
|
||||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
static const CompileTimeErrorCode ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING =
|
||||
|
@ -3033,6 +3034,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
correctionMessage:
|
||||
"Try specifying the getter name explicitly, or using a variable "
|
||||
"pattern.",
|
||||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
/// Parameters:
|
||||
|
@ -4493,6 +4495,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
|
|||
'REST_ELEMENT_IN_MAP_PATTERN',
|
||||
"A map pattern can't contain a rest pattern.",
|
||||
correctionMessage: "Try removing the rest pattern.",
|
||||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
/// No parameters.
|
||||
|
@ -6587,6 +6590,7 @@ class WarningCode extends AnalyzerErrorCode {
|
|||
"The annotation 'visibleOutsideTemplate' can only be applied to a member "
|
||||
"of a class, enum, or mixin that is annotated with "
|
||||
"'visibleForTemplate'.",
|
||||
hasPublishedDocs: true,
|
||||
);
|
||||
|
||||
/// Parameters:
|
||||
|
|
|
@ -99,7 +99,7 @@ class PubspecWarningCode extends ErrorCode {
|
|||
'INVALID_PLATFORMS_FIELD',
|
||||
"The 'platforms' field must be a map with platforms as keys.",
|
||||
correctionMessage:
|
||||
"Try changing the 'platforms' field to a map with plaforms as keys.",
|
||||
"Try changing the 'platforms' field to a map with platforms as keys.",
|
||||
);
|
||||
|
||||
/// No parameters.
|
||||
|
|
|
@ -4081,7 +4081,7 @@ CompileTimeErrorCode:
|
|||
EMPTY_MAP_PATTERN:
|
||||
problemMessage: A map pattern must have at least one entry.
|
||||
correctionMessage: Try replacing it with an object pattern 'Map()'.
|
||||
hasPublishedDocs: false
|
||||
hasPublishedDocs: true
|
||||
comment: No parameters.
|
||||
documentation: |-
|
||||
#### Description
|
||||
|
@ -9293,7 +9293,7 @@ CompileTimeErrorCode:
|
|||
MISSING_NAMED_PATTERN_FIELD_NAME:
|
||||
problemMessage: The getter name is not specified explicitly, and the pattern is not a variable.
|
||||
correctionMessage: Try specifying the getter name explicitly, or using a variable pattern.
|
||||
hasPublishedDocs: false
|
||||
hasPublishedDocs: true
|
||||
comment: No parameters.
|
||||
documentation: |-
|
||||
#### Description
|
||||
|
@ -9301,6 +9301,7 @@ CompileTimeErrorCode:
|
|||
The analyzer produces this diagnostic when, within an object pattern, the
|
||||
specification of a property and the pattern used to match the property's
|
||||
value doesn't have either:
|
||||
|
||||
- a getter name before the colon
|
||||
- a variable pattern from which the getter name can be inferred
|
||||
|
||||
|
@ -14119,7 +14120,7 @@ CompileTimeErrorCode:
|
|||
REST_ELEMENT_IN_MAP_PATTERN:
|
||||
problemMessage: A map pattern can't contain a rest pattern.
|
||||
correctionMessage: Try removing the rest pattern.
|
||||
hasPublishedDocs: false
|
||||
hasPublishedDocs: true
|
||||
comment: No parameters.
|
||||
documentation: |-
|
||||
#### Description
|
||||
|
@ -14127,7 +14128,7 @@ CompileTimeErrorCode:
|
|||
The analyzer produces this diagnostic when a map pattern contains a rest
|
||||
pattern. Map patterns match a map with more keys
|
||||
than those explicitly given in the pattern (as long as the given keys match),
|
||||
so a rest pattern is unnecesssary.
|
||||
so a rest pattern is unnecessary.
|
||||
|
||||
#### Example
|
||||
|
||||
|
@ -19066,7 +19067,7 @@ FfiCode:
|
|||
comment: |-
|
||||
Parameters:
|
||||
0: the return type that should be 'void'.
|
||||
hasPublishedDocs: false
|
||||
hasPublishedDocs: true
|
||||
documentation: |-
|
||||
#### Description
|
||||
|
||||
|
@ -20000,7 +20001,7 @@ HintCode:
|
|||
#### Example
|
||||
|
||||
The following code produces this diagnostic because the value `1` was
|
||||
matched in the preceeding case:
|
||||
matched in the preceding case:
|
||||
|
||||
```dart
|
||||
void f(int x) {
|
||||
|
@ -20834,7 +20835,7 @@ PubspecWarningCode:
|
|||
```
|
||||
INVALID_PLATFORMS_FIELD:
|
||||
problemMessage: "The 'platforms' field must be a map with platforms as keys."
|
||||
correctionMessage: "Try changing the 'platforms' field to a map with plaforms as keys."
|
||||
correctionMessage: "Try changing the 'platforms' field to a map with platforms as keys."
|
||||
hasPublishedDocs: false
|
||||
comment: No parameters.
|
||||
documentation: |-
|
||||
|
@ -23272,7 +23273,7 @@ WarningCode:
|
|||
```
|
||||
INVALID_VISIBLE_OUTSIDE_TEMPLATE_ANNOTATION:
|
||||
problemMessage: "The annotation 'visibleOutsideTemplate' can only be applied to a member of a class, enum, or mixin that is annotated with 'visibleForTemplate'."
|
||||
hasPublishedDocs: false
|
||||
hasPublishedDocs: true
|
||||
comment: No parameters.
|
||||
documentation: |-
|
||||
#### Description
|
||||
|
|
|
@ -12024,6 +12024,7 @@ variable._
|
|||
The analyzer produces this diagnostic when, within an object pattern, the
|
||||
specification of a property and the pattern used to match the property's
|
||||
value doesn't have either:
|
||||
|
||||
- a getter name before the colon
|
||||
- a variable pattern from which the getter name can be inferred
|
||||
|
||||
|
@ -17522,7 +17523,7 @@ _A map pattern can't contain a rest pattern._
|
|||
The analyzer produces this diagnostic when a map pattern contains a rest
|
||||
pattern. Map patterns match a map with more keys
|
||||
than those explicitly given in the pattern (as long as the given keys match),
|
||||
so a rest pattern is unnecesssary.
|
||||
so a rest pattern is unnecessary.
|
||||
|
||||
#### Example
|
||||
|
||||
|
@ -21323,7 +21324,7 @@ matched by an earlier `case` clause.
|
|||
#### Example
|
||||
|
||||
The following code produces this diagnostic because the value `1` was
|
||||
matched in the preceeding case:
|
||||
matched in the preceding case:
|
||||
|
||||
{% prettify dart tag=pre+code %}
|
||||
void f(int x) {
|
||||
|
|
Loading…
Reference in a new issue