diff --git a/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart index 705d7aa3b8c..7290ea1f0ac 100644 --- a/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart +++ b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart @@ -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: diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart index 6da3ba5dcdb..603aa60e3ec 100644 --- a/pkg/analyzer/lib/src/error/codes.g.dart +++ b/pkg/analyzer/lib/src/error/codes.g.dart @@ -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: diff --git a/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart index b675d337d2d..89600fb3117 100644 --- a/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart +++ b/pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart @@ -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. diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml index 8c9fa7a4335..6dcc99ef935 100644 --- a/pkg/analyzer/messages.yaml +++ b/pkg/analyzer/messages.yaml @@ -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 diff --git a/pkg/analyzer/tool/diagnostics/diagnostics.md b/pkg/analyzer/tool/diagnostics/diagnostics.md index 33c6d104715..88d3f4519c6 100644 --- a/pkg/analyzer/tool/diagnostics/diagnostics.md +++ b/pkg/analyzer/tool/diagnostics/diagnostics.md @@ -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) {