[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>
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 705d7aa..7290ea1 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 @@
     "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 6da3ba5..603aa60 100644
--- a/pkg/analyzer/lib/src/error/codes.g.dart
+++ b/pkg/analyzer/lib/src/error/codes.g.dart
@@ -1308,6 +1308,7 @@
     '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 @@
     correctionMessage:
         "Try specifying the getter name explicitly, or using a variable "
         "pattern.",
+    hasPublishedDocs: true,
   );
 
   ///  Parameters:
@@ -4493,6 +4495,7 @@
     '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 @@
     "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 b675d33..89600fb 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 @@
     '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 8c9fa7a..6dcc99e 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -4081,7 +4081,7 @@
   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 @@
   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 @@
       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 @@
   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 @@
       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 @@
     comment: |-
       Parameters:
       0: the return type that should be 'void'.
-    hasPublishedDocs: false
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -20000,7 +20001,7 @@
       #### 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 @@
       ```
   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 @@
       ```
   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 33c6d10..88d3f45 100644
--- a/pkg/analyzer/tool/diagnostics/diagnostics.md
+++ b/pkg/analyzer/tool/diagnostics/diagnostics.md
@@ -12024,6 +12024,7 @@
 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 @@
 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 @@
 #### 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) {