Version 2.17.0-155.0.dev

Merge commit '8b48d282266268ee8b4a3b270d6ca17989944a97' into 'dev'
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/replace_null_check_with_cast.dart b/pkg/analysis_server/lib/src/services/correction/dart/replace_null_check_with_cast.dart
new file mode 100644
index 0000000..8f2faf8
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/replace_null_check_with_cast.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:analyzer_plugin/utilities/range_factory.dart';
+
+class ReplaceNullCheckWithCast extends CorrectionProducer {
+  @override
+  bool get canBeAppliedInBulk => true;
+
+  @override
+  bool get canBeAppliedToFile => true;
+
+  @override
+  FixKind get fixKind => DartFixKind.REPLACE_NULL_CHECK_WITH_CAST;
+
+  @override
+  FixKind get multiFixKind => DartFixKind.REPLACE_NULL_CHECK_WITH_CAST_MULTI;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    final node = this.node;
+    if (node is! PostfixExpression) {
+      return;
+    }
+    var operand = node.operand;
+    var operator = node.operator;
+    var operandType = operand.staticType;
+    if (operandType is! TypeParameterType) {
+      return;
+    }
+    // It is possible that there are cases of precedence and syntax which would
+    // require additional parentheses, for example converting `p!.hashCode` to
+    // `(p as T).hashCode`. However no such cases are known to trigger the lint
+    // rule.
+    // TODO(srawlins): Follow up on
+    // https://github.com/dart-lang/linter/issues/3256.
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addSimpleReplacement(range.token(operator),
+          ' as ${operandType.getDisplayString(withNullability: false)}');
+    });
+  }
+
+  /// Return an instance of this class. Used as a tear-off in `FixProcessor`.
+  static ReplaceNullCheckWithCast newInstance() => ReplaceNullCheckWithCast();
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index 819a2a7..724920c 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -1258,6 +1258,16 @@
     DartFixKindPriority.IN_FILE,
     "Replace 'new' with 'const' where possible in file",
   );
+  static const REPLACE_NULL_CHECK_WITH_CAST = FixKind(
+    'dart.fix.replace.nullCheckWithCast',
+    DartFixKindPriority.DEFAULT,
+    'Replace null check with a cast',
+  );
+  static const REPLACE_NULL_CHECK_WITH_CAST_MULTI = FixKind(
+    'dart.fix.replace.nullCheckWithCast.multi',
+    DartFixKindPriority.IN_FILE,
+    'Replace null checks with casts in file',
+  );
   static const REPLACE_NULL_WITH_CLOSURE = FixKind(
     'dart.fix.replace.nullWithClosure',
     DartFixKindPriority.DEFAULT,
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 901695f..bb89d71 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -152,6 +152,7 @@
 import 'package:analysis_server/src/services/correction/dart/replace_final_with_const.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_final_with_var.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_new_with_const.dart';
+import 'package:analysis_server/src/services/correction/dart/replace_null_check_with_cast.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_null_with_closure.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_return_type.dart';
 import 'package:analysis_server/src/services/correction/dart/replace_return_type_future.dart';
@@ -459,6 +460,9 @@
     LintNames.non_constant_identifier_names: [
       RenameToCamelCase.newInstance,
     ],
+    LintNames.null_check_on_nullable_type_parameter: [
+      ReplaceNullCheckWithCast.newInstance,
+    ],
     LintNames.null_closures: [
       ReplaceNullWithClosure.newInstance,
     ],
diff --git a/pkg/analysis_server/lib/src/services/linter/lint_names.dart b/pkg/analysis_server/lib/src/services/linter/lint_names.dart
index 986a5a4..d94fd94 100644
--- a/pkg/analysis_server/lib/src/services/linter/lint_names.dart
+++ b/pkg/analysis_server/lib/src/services/linter/lint_names.dart
@@ -63,6 +63,8 @@
       'no_leading_underscores_for_local_identifiers';
   static const String non_constant_identifier_names =
       'non_constant_identifier_names';
+  static const String null_check_on_nullable_type_parameter =
+      'null_check_on_nullable_type_parameter';
   static const String null_closures = 'null_closures';
   static const String omit_local_variable_types = 'omit_local_variable_types';
   static const String prefer_adjacent_string_concatenation =
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_null_check_with_cast_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_null_check_with_cast_test.dart
new file mode 100644
index 0000000..d99e73f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_null_check_with_cast_test.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/linter/lint_names.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceNullCheckWithCastBulkTest);
+    defineReflectiveTests(ReplaceNullCheckWithCastTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceNullCheckWithCastBulkTest extends BulkFixProcessorTest {
+  @override
+  String get lintCode => LintNames.null_check_on_nullable_type_parameter;
+
+  Future<void> test_singleFile() async {
+    await resolveTestCode('''
+T f<T>(T? result) {
+  if (1==1) {
+    return result!;
+  } else {
+    return result!;
+  }
+}
+''');
+    await assertHasFix('''
+T f<T>(T? result) {
+  if (1==1) {
+    return result as T;
+  } else {
+    return result as T;
+  }
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ReplaceNullCheckWithCastTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_NULL_CHECK_WITH_CAST;
+
+  @override
+  String get lintCode => LintNames.null_check_on_nullable_type_parameter;
+
+  Future<void> test_simpleIdentifier() async {
+    await resolveTestCode('''
+T run<T>(T? result) {
+  return result!;
+}
+''');
+    await assertHasFix('''
+T run<T>(T? result) {
+  return result as T;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
index c1d46b5..fc4bb66 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
@@ -187,6 +187,7 @@
 import 'replace_final_with_const_test.dart' as replace_final_with_const;
 import 'replace_final_with_var_test.dart' as replace_final_with_var;
 import 'replace_new_with_const_test.dart' as replace_new_with_const;
+import 'replace_null_check_with_cast_test.dart' as replace_null_check_with_cast;
 import 'replace_null_with_closure_test.dart' as replace_null_with_closure;
 import 'replace_return_type_future_test.dart' as replace_return_type_future;
 import 'replace_return_type_iterable_test.dart' as replace_return_type_iterable;
@@ -382,6 +383,7 @@
     replace_final_with_const.main();
     replace_final_with_var.main();
     replace_new_with_const.main();
+    replace_null_check_with_cast.main();
     replace_null_with_closure.main();
     replace_null_with_void.main();
     replace_return_type.main();
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 c8ff006..18488af 100644
--- a/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/ffi_code.g.dart
@@ -103,6 +103,7 @@
     "Fields in a struct class whose type is 'Pointer' shouldn't have any "
         "annotations.",
     correctionMessage: "Try removing the annotation.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -163,6 +164,7 @@
     'ARGUMENT_MUST_BE_A_CONSTANT',
     "Argument '{0}' must be a constant.",
     correctionMessage: "Try replacing the value with a literal or const.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -220,6 +222,7 @@
         "be instantiated by a generative constructor.",
     correctionMessage:
         "Try allocating it via allocation, or load from a 'Pointer'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -279,6 +282,7 @@
     "The class '{0}' can't be empty because it's a subclass of '{1}'.",
     correctionMessage:
         "Try adding a field to '{0}' or use a different superclass.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -323,6 +327,7 @@
     "Fields in a struct class must have exactly one annotation indicating the "
         "native type.",
     correctionMessage: "Try removing the extra annotation.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -367,6 +372,7 @@
     'EXTRA_SIZE_ANNOTATION_CARRAY',
     "'Array's must have exactly one 'Array' annotation.",
     correctionMessage: "Try removing the extra annotation.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -465,6 +471,7 @@
         "initializers.",
     correctionMessage:
         "Try removing the field initializer and marking the field as external.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -508,6 +515,7 @@
     "Fields in subclasses of 'Struct' and 'Union' can't have initializers.",
     correctionMessage:
         "Try removing the initializer and marking the field as external.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -550,6 +558,7 @@
     'FIELD_MUST_BE_EXTERNAL_IN_STRUCT',
     "Fields of 'Struct' and 'Union' subclasses must be marked external.",
     correctionMessage: "Try adding the 'external' modifier.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -592,6 +601,7 @@
     "The class '{0}' can't extend 'Struct' or 'Union' because '{0}' is "
         "generic.",
     correctionMessage: "Try removing the type parameters from '{0}'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -644,6 +654,7 @@
         "(the second argument) when the return type of the function is either "
         "'void', 'Handle' or 'Pointer'.",
     correctionMessage: "Try removing the exceptional return value.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -698,6 +709,7 @@
     correctionMessage:
         "Try using 'int', 'double', 'Array', 'Pointer', or subtype of 'Struct' "
         "or 'Union'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -758,6 +770,7 @@
     'LEAF_CALL_MUST_NOT_RETURN_HANDLE',
     "FFI leaf call can't return a 'Handle'.",
     correctionMessage: "Try changing the return type to primitive or struct.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -812,6 +825,7 @@
     'LEAF_CALL_MUST_NOT_TAKE_HANDLE',
     "FFI leaf call can't take arguments of type 'Handle'.",
     correctionMessage: "Try changing the argument type to primitive or struct.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -867,6 +881,7 @@
     correctionMessage:
         "Try using a different annotation or changing the declared type to "
         "match.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -912,6 +927,7 @@
     "Fields in a struct class must either have the type 'Pointer' or an "
         "annotation indicating the native type.",
     correctionMessage: "Try adding an annotation.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -961,6 +977,7 @@
         "(the second argument) when the return type of the function is neither "
         "'void', 'Handle', nor 'Pointer'.",
     correctionMessage: "Try adding an exceptional return value.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1012,6 +1029,7 @@
     "Fields in struct classes must have an explicitly declared type of 'int', "
         "'double' or 'Pointer'.",
     correctionMessage: "Try using 'int', 'double' or 'Pointer'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1056,6 +1074,7 @@
     correctionMessage:
         "Try adding an 'Array' annotation, or removing all but one of the "
         "annotations.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1110,6 +1129,7 @@
         "type.",
     correctionMessage:
         "Try changing the type to only use members for 'dart:ffi'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1180,6 +1200,7 @@
     'MUST_BE_A_SUBTYPE',
     "The type '{0}' must be a subtype of '{1}' for '{2}'.",
     correctionMessage: "Try changing one or both of the type arguments.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1231,6 +1252,7 @@
     "The type arguments to '{0}' must be known at compile time, so they can't "
         "be type parameters.",
     correctionMessage: "Try changing the type argument to be a constant type.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1287,6 +1309,7 @@
     correctionMessage:
         "Try changing the function argument in 'NativeFunction' to only use "
         "NativeTypes.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1329,6 +1352,7 @@
     'NON_POSITIVE_ARRAY_DIMENSION',
     "Array dimensions must be positive numbers.",
     correctionMessage: "Try changing the input to a positive number.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1378,6 +1402,7 @@
     correctionMessage:
         "Try using a native integer, 'Float', 'Double', 'Pointer', or subtype "
         "of 'Struct', 'Union', or 'AbiSpecificInteger'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1421,6 +1446,7 @@
     'PACKED_ANNOTATION',
     "Structs must have at most one 'Packed' annotation.",
     correctionMessage: "Try removing extra 'Packed' annotations.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1464,6 +1490,7 @@
     "Only packing to 1, 2, 4, 8, and 16 bytes is supported.",
     correctionMessage:
         "Try changing the 'Packed' annotation alignment to 1, 2, 4, 8, or 16.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1554,6 +1581,7 @@
     correctionMessage:
         "Try packing the nested struct or packing the nested struct more "
         "tightly.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1610,6 +1638,7 @@
     'SIZE_ANNOTATION_DIMENSIONS',
     "'Array's must have an 'Array' annotation that matches the dimensions.",
     correctionMessage: "Try adjusting the arguments in the 'Array' annotation.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1661,6 +1690,7 @@
     'SUBTYPE_OF_FFI_CLASS',
     "The class '{0}' can't extend '{1}'.",
     correctionMessage: "Try extending 'Struct' or 'Union'.",
+    hasPublishedDocs: true,
     uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_EXTENDS',
   );
 
@@ -1673,6 +1703,7 @@
     'SUBTYPE_OF_FFI_CLASS',
     "The class '{0}' can't implement '{1}'.",
     correctionMessage: "Try implementing 'Allocator' or 'Finalizable'.",
+    hasPublishedDocs: true,
     uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_IMPLEMENTS',
   );
 
@@ -1685,6 +1716,7 @@
     'SUBTYPE_OF_FFI_CLASS',
     "The class '{0}' can't mix in '{1}'.",
     correctionMessage: "Try extending 'Struct' or 'Union'.",
+    hasPublishedDocs: true,
     uniqueName: 'SUBTYPE_OF_FFI_CLASS_IN_WITH',
   );
 
@@ -1743,6 +1775,7 @@
         "'Struct', 'Union', or 'AbiSpecificInteger'.",
     correctionMessage:
         "Try extending 'Struct', 'Union', or 'AbiSpecificInteger' directly.",
+    hasPublishedDocs: true,
     uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS',
   );
 
@@ -1757,6 +1790,7 @@
         "'Struct', 'Union', or 'AbiSpecificInteger'.",
     correctionMessage:
         "Try extending 'Struct', 'Union', or 'AbiSpecificInteger' directly.",
+    hasPublishedDocs: true,
     uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_IMPLEMENTS',
   );
 
@@ -1771,6 +1805,7 @@
         "'Struct', 'Union', or 'AbiSpecificInteger'.",
     correctionMessage:
         "Try extending 'Struct', 'Union', or 'AbiSpecificInteger' directly.",
+    hasPublishedDocs: true,
     uniqueName: 'SUBTYPE_OF_STRUCT_CLASS_IN_WITH',
   );
 
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
index b4770bd..aa8d8df 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart
@@ -113,6 +113,7 @@
     "'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or "
         "top-level variable.",
     correctionMessage: "Try removing the assignment.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -571,6 +572,7 @@
     'DEPRECATED_NEW_IN_COMMENT_REFERENCE',
     "Using the 'new' keyword in a comment reference is deprecated.",
     correctionMessage: "Try referring to a constructor by its name.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1027,6 +1029,7 @@
     "The library '{0}' is legacy, and shouldn't be imported into a null safe "
         "library.",
     correctionMessage: "Try migrating the imported library.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1132,6 +1135,7 @@
   static const HintCode INVALID_ANNOTATION_TARGET = HintCode(
     'INVALID_ANNOTATION_TARGET',
     "The annotation '{0}' can only be used on {1}.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1177,6 +1181,7 @@
     'INVALID_EXPORT_OF_INTERNAL_ELEMENT',
     "The member '{0}' can't be exported as a part of a package's public API.",
     correctionMessage: "Try using a hide clause to hide '{0}'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1226,6 +1231,7 @@
     "The member '{0}' can't be exported as a part of a package's public API, "
         "but is indirectly exported as part of the signature of '{1}'.",
     correctionMessage: "Try using a hide clause to hide '{0}'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1280,6 +1286,7 @@
   static const HintCode INVALID_FACTORY_METHOD_DECL = HintCode(
     'INVALID_FACTORY_METHOD_DECL',
     "Factory method '{0}' must have a return type.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1327,6 +1334,7 @@
   static const HintCode INVALID_FACTORY_METHOD_IMPL = HintCode(
     'INVALID_FACTORY_METHOD_IMPL',
     "Factory method '{0}' doesn't return a newly allocated object.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1396,6 +1404,7 @@
     'INVALID_INTERNAL_ANNOTATION',
     "Only public elements in a package's private API can be annotated as being "
         "internal.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -1432,6 +1441,7 @@
     correctionMessage:
         "Specify a Dart language version override with a comment like '// "
         "@dart = 2.0'.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN',
   );
 
@@ -1445,6 +1455,7 @@
     correctionMessage:
         "Specify a Dart language version override with a comment like '// "
         "@dart = 2.0'.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS',
   );
 
@@ -1453,6 +1464,7 @@
     "The language version override can't specify a version greater than the "
         "latest known language version: {0}.{1}.",
     correctionMessage: "Try removing the language version override.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_GREATER',
   );
 
@@ -1462,6 +1474,7 @@
         "directive.",
     correctionMessage:
         "Try moving the language version override to the top of the file.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOCATION',
   );
 
@@ -1475,6 +1488,7 @@
     correctionMessage:
         "Specify a Dart language version override with a comment like '// "
         "@dart = 2.0'.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE',
   );
 
@@ -1488,6 +1502,7 @@
     correctionMessage:
         "Specify a Dart language version override with a comment like '// "
         "@dart = 2.0'.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER',
   );
 
@@ -1501,6 +1516,7 @@
     correctionMessage:
         "Specify a Dart language version override with a comment like '// "
         "@dart = 2.0'.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX',
   );
 
@@ -1515,6 +1531,7 @@
     correctionMessage:
         "Specify a Dart language version override with a comment like '// "
         "@dart = 2.0'.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS',
   );
 
@@ -1529,6 +1546,7 @@
     correctionMessage:
         "Specify a Dart language version override with a comment like '// "
         "@dart = 2.0'.",
+    hasPublishedDocs: true,
     uniqueName: 'INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES',
   );
 
@@ -1712,6 +1730,7 @@
   static const HintCode INVALID_USE_OF_INTERNAL_MEMBER = HintCode(
     'INVALID_USE_OF_INTERNAL_MEMBER',
     "The member '{0}' can only be used within its package.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -2391,6 +2410,7 @@
     'NULL_CHECK_ALWAYS_FAILS',
     "This null-check will always throw an exception because the expression "
         "will always evaluate to 'null'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -2575,6 +2595,7 @@
     "'{0}' is annotated with 'doNotStore' and shouldn't be returned unless "
         "'{1}' is also annotated.",
     correctionMessage: "Annotate '{1}' with 'doNotStore'.",
+    hasPublishedDocs: true,
   );
 
   /**
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index 93fe973..06dc036 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -791,6 +791,7 @@
     'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
     "Field formal parameters can only be used in a constructor.",
     correctionMessage: "Try removing 'this.'.",
+    hasPublishedDocs: true,
   );
 
   static const ParserErrorCode FINAL_AND_COVARIANT = ParserErrorCode(
diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart
index 0b8ddc5..ad9d61e 100644
--- a/pkg/analyzer/lib/src/error/codes.g.dart
+++ b/pkg/analyzer/lib/src/error/codes.g.dart
@@ -3104,6 +3104,7 @@
     'CONTINUE_LABEL_ON_SWITCH',
     "A `continue` label resolves to a `switch` statement, but the label must "
         "be on a loop or a switch member.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -3440,6 +3441,7 @@
         "Try removing the type arguments, or instantiating the type(s) of a "
         "generic type, generic function, generic instance method, or generic "
         "constructor.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -3762,6 +3764,7 @@
     'ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING',
     "The name of the enum constant can't be the same as the enum's name.",
     correctionMessage: "Try renaming the constant.",
+    hasPublishedDocs: true,
   );
 
   static const CompileTimeErrorCode ENUM_CONSTANT_WITH_NON_CONST_CONSTRUCTOR =
@@ -4738,6 +4741,7 @@
     correctionMessage:
         "Try removing the field initializer or the 'external' keyword from the "
         "field declaration.",
+    hasPublishedDocs: true,
     uniqueName: 'EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER',
   );
 
@@ -4747,6 +4751,7 @@
     "External fields can't have initializers.",
     correctionMessage:
         "Try removing the initializer or the 'external' keyword.",
+    hasPublishedDocs: true,
     uniqueName: 'EXTERNAL_FIELD_INITIALIZER',
   );
 
@@ -4756,6 +4761,7 @@
     "External variables can't have initializers.",
     correctionMessage:
         "Try removing the initializer or the 'external' keyword.",
+    hasPublishedDocs: true,
     uniqueName: 'EXTERNAL_VARIABLE_INITIALIZER',
   );
 
@@ -5153,6 +5159,7 @@
     'FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR',
     "Initializing formal parameters can only be used in constructors.",
     correctionMessage: "Try using a normal parameter.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -6339,6 +6346,7 @@
     'IMPORT_OF_NON_LIBRARY',
     "The imported library '{0}' can't have a part-of directive.",
     correctionMessage: "Try importing the library that the part is a part of.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -6483,6 +6491,7 @@
     'INCONSISTENT_LANGUAGE_VERSION_OVERRIDE',
     "Parts must have exactly the same language version override as the "
         "library.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -9549,6 +9558,7 @@
     'MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS',
     "Constructors can have only one 'this' redirection, at most.",
     correctionMessage: "Try removing all but one of the redirections.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -10825,6 +10835,7 @@
         "Try adding an explicit constructor that has a different "
         "superinitializer or changing the superclass constructor '{2}' to not "
         "be a factory constructor.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -11728,6 +11739,7 @@
         "Try implementing the class instead, adding a generative (not factory) "
         "constructor to the superclass '{1}', or a factory constructor to the "
         "subclass.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -12306,6 +12318,7 @@
         "declaration.",
     correctionMessage:
         "Try renaming either the prefix or the local declaration.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -12446,6 +12459,7 @@
     "The setter '{0}' is private and can't be accessed outside the library "
         "that declares it.",
     correctionMessage: "Try making it public.",
+    hasPublishedDocs: true,
   );
 
   // #### Description
@@ -12490,6 +12504,7 @@
         "unassigned at this point.",
     correctionMessage:
         "Ensure that it is assigned on necessary execution paths.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -12889,6 +12904,7 @@
     "The redirecting constructor '{0}' can't redirect to a constructor of the "
         "abstract class '{1}'.",
     correctionMessage: "Try redirecting to a constructor of a different class.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -13093,6 +13109,7 @@
     correctionMessage:
         "Try redirecting to a different constructor, or define the constructor "
         "named '{0}'.",
+    hasPublishedDocs: true,
   );
 
   /**
@@ -14047,6 +14064,7 @@
     'SWITCH_CASE_COMPLETES_NORMALLY',
     "The 'case' shouldn't complete normally.",
     correctionMessage: "Try adding 'break', 'return', or 'throw'.",
+    hasPublishedDocs: true,
   );
 
   /**
diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml
index 9197dac..0269177 100644
--- a/pkg/analyzer/messages.yaml
+++ b/pkg/analyzer/messages.yaml
@@ -2781,6 +2781,7 @@
       0: the name of the type
   CONTINUE_LABEL_ON_SWITCH:
     problemMessage: A `continue` label resolves to a `switch` statement, but the label must be on a loop or a switch member.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -3122,6 +3123,7 @@
     problemMessage: Only a generic type, generic function, generic instance method, or generic constructor can have type arguments.
     correctionMessage: Try removing the type arguments, or instantiating the type(s) of a generic type, generic function, generic instance method, or generic constructor.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -3413,6 +3415,7 @@
   ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING:
     problemMessage: "The name of the enum constant can't be the same as the enum's name."
     correctionMessage: Try renaming the constant.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -4109,6 +4112,7 @@
     sharedName: EXTERNAL_WITH_INITIALIZER
     problemMessage: External fields can't have initializers.
     correctionMessage: "Try removing the field initializer or the 'external' keyword from the field declaration."
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -4157,10 +4161,12 @@
     sharedName: EXTERNAL_WITH_INITIALIZER
     problemMessage: External fields can't have initializers.
     correctionMessage: "Try removing the initializer or the 'external' keyword."
+    hasPublishedDocs: true
   EXTERNAL_VARIABLE_INITIALIZER:
     sharedName: EXTERNAL_WITH_INITIALIZER
     problemMessage: External variables can't have initializers.
     correctionMessage: "Try removing the initializer or the 'external' keyword."
+    hasPublishedDocs: true
   EXTRA_POSITIONAL_ARGUMENTS:
     problemMessage: "Too many positional arguments: {0} expected, but {1} found."
     correctionMessage: Try removing the extra arguments.
@@ -4493,6 +4499,7 @@
     correctionMessage: Try using a normal parameter.
     comment: |-
       No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -5467,6 +5474,7 @@
     comment: |-
       Parameters:
       0: the uri pointing to a non-library declaration
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -5581,6 +5589,7 @@
     problemMessage: Parts must have exactly the same language version override as the library.
     comment: |-
       No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -8181,6 +8190,7 @@
     correctionMessage: Try removing all but one of the redirections.
     comment: |-
       No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -9119,6 +9129,7 @@
       0: the name of the superclass
       1: the name of the current class
       2: the implicitly called factory constructor of the superclass
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -9911,6 +9922,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the superclass
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -10426,6 +10438,7 @@
     comment: |-
       Parameters:
       0: the prefix being shadowed
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -10557,6 +10570,7 @@
   PRIVATE_SETTER:
     problemMessage: "The setter '{0}' is private and can't be accessed outside the library that declares it."
     correctionMessage: Try making it public.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -10601,6 +10615,7 @@
   READ_POTENTIALLY_UNASSIGNED_FINAL:
     problemMessage: "The final variable '{0}' can't be read because it's potentially unassigned at this point."
     correctionMessage: Ensure that it is assigned on necessary execution paths.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -10943,6 +10958,7 @@
       Parameters:
       0: the name of the redirecting constructor
       1: the name of the abstract class defining the constructor being redirected to
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -11119,6 +11135,7 @@
       Parameters:
       0: the name of the constructor
       1: the name of the class containing the constructor
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -12122,6 +12139,7 @@
     correctionMessage: "Try adding 'break', 'return', or 'throw'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14541,6 +14559,7 @@
     problemMessage: "Fields in a struct class whose type is 'Pointer' shouldn't have any annotations."
     correctionMessage: Try removing the annotation.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14582,6 +14601,7 @@
     comment: |-
       Parameters:
       0: the name of the argument
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14637,6 +14657,7 @@
     problemMessage: "Subclasses of 'Struct' and 'Union' are backed by native memory, and can't be instantiated by a generative constructor."
     correctionMessage: "Try allocating it via allocation, or load from a 'Pointer'."
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14691,6 +14712,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the superclass
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14743,6 +14765,7 @@
     problemMessage: Fields in a struct class must have exactly one annotation indicating the native type.
     correctionMessage: Try removing the extra annotation.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14782,6 +14805,7 @@
     problemMessage: "'Array's must have exactly one 'Array' annotation."
     correctionMessage: Try removing the extra annotation.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14844,6 +14868,7 @@
     problemMessage: "Constructors in subclasses of 'Struct' and 'Union' can't have field initializers."
     correctionMessage: Try removing the field initializer and marking the field as external.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14888,6 +14913,7 @@
     problemMessage: "Fields in subclasses of 'Struct' and 'Union' can't have initializers."
     correctionMessage: Try removing the initializer and marking the field as external.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14926,6 +14952,7 @@
     problemMessage: "Fields of 'Struct' and 'Union' subclasses must be marked external."
     correctionMessage: "Try adding the 'external' modifier."
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -14966,6 +14993,7 @@
     comment: |-
       Parameters:
       0: the name of the struct class
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15002,6 +15030,7 @@
     problemMessage: "The method 'Pointer.fromFunction' can't have an exceptional return value (the second argument) when the return type of the function is either 'void', 'Handle' or 'Pointer'."
     correctionMessage: Try removing the exceptional return value.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15050,6 +15079,7 @@
     comment: |-
       Parameters:
       0: the type of the field
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15095,6 +15125,7 @@
     problemMessage: "FFI leaf call can't return a 'Handle'."
     correctionMessage: Try changing the return type to primitive or struct.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15151,6 +15182,7 @@
     problemMessage: "FFI leaf call can't take arguments of type 'Handle'."
     correctionMessage: Try changing the argument type to primitive or struct.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15201,6 +15233,7 @@
     problemMessage: "The annotation doesn't match the declared type of the field."
     correctionMessage: Try using a different annotation or changing the declared type to match.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15250,6 +15283,7 @@
     problemMessage: "Fields in a struct class must either have the type 'Pointer' or an annotation indicating the native type."
     correctionMessage: Try adding an annotation.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15290,6 +15324,7 @@
     problemMessage: "The method 'Pointer.fromFunction' must have an exceptional return value (the second argument) when the return type of the function is neither 'void', 'Handle', nor 'Pointer'."
     correctionMessage: Try adding an exceptional return value.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15335,6 +15370,7 @@
     comment: |-
       Parameters:
       0: the type of the field
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15380,6 +15416,7 @@
     problemMessage: "Fields of type 'Array' must have exactly one 'Array' annotation."
     correctionMessage: "Try adding an 'Array' annotation, or removing all but one of the annotations."
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15421,6 +15458,7 @@
       Parameters:
       0: the type that should be a valid dart:ffi native type.
       1: the name of the function whose invocation depends on this relationship
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15471,6 +15509,7 @@
       0: the type that should be a subtype
       1: the supertype that the subtype is compared to
       2: the name of the function whose invocation depends on this relationship
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15536,6 +15575,7 @@
     comment: |-
       Parameters:
       0: the name of the function, method, or constructor having type arguments
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15583,6 +15623,7 @@
     comment: |-
       Parameters:
       0: the type that should be a valid dart:ffi native type.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15631,6 +15672,7 @@
     problemMessage: Array dimensions must be positive numbers.
     correctionMessage: Try changing the input to a positive number.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15671,6 +15713,7 @@
     comment: |-
       Parameters:
       0: the type of the field
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15711,6 +15754,7 @@
     problemMessage: "Structs must have at most one 'Packed' annotation."
     correctionMessage: "Try removing extra 'Packed' annotations."
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15750,6 +15794,7 @@
     problemMessage: Only packing to 1, 2, 4, 8, and 16 bytes is supported.
     correctionMessage: "Try changing the 'Packed' annotation alignment to 1, 2, 4, 8, or 16."
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15791,6 +15836,7 @@
       Parameters:
       0: the name of the outer struct
       1: the name of the struct being nested
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15872,6 +15918,7 @@
     problemMessage: "'Array's must have an 'Array' annotation that matches the dimensions."
     correctionMessage: "Try adjusting the arguments in the 'Array' annotation."
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15928,6 +15975,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the class being extended, implemented, or mixed in
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -15977,6 +16025,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the class being extended, implemented, or mixed in
+    hasPublishedDocs: true
   SUBTYPE_OF_FFI_CLASS_IN_WITH:
     sharedName: SUBTYPE_OF_FFI_CLASS
     problemMessage: "The class '{0}' can't mix in '{1}'."
@@ -15985,6 +16034,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the class being extended, implemented, or mixed in
+    hasPublishedDocs: true
   SUBTYPE_OF_STRUCT_CLASS_IN_EXTENDS:
     sharedName: SUBTYPE_OF_STRUCT_CLASS
     problemMessage: "The class '{0}' can't extend '{1}' because '{1}' is a subtype of 'Struct', 'Union', or 'AbiSpecificInteger'."
@@ -15993,6 +16043,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the class being extended, implemented, or mixed in
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -16046,6 +16097,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the class being extended, implemented, or mixed in
+    hasPublishedDocs: true
   SUBTYPE_OF_STRUCT_CLASS_IN_WITH:
     sharedName: SUBTYPE_OF_STRUCT_CLASS
     problemMessage: "The class '{0}' can't mix in '{1}' because '{1}' is a subtype of 'Struct', 'Union', or 'AbiSpecificInteger'."
@@ -16054,6 +16106,7 @@
       Parameters:
       0: the name of the subclass
       1: the name of the class being extended, implemented, or mixed in
+    hasPublishedDocs: true
 HintCode:
   ARGUMENT_TYPE_NOT_ASSIGNABLE_TO_ERROR_HANDLER:
     problemMessage: "The argument type '{0}' can't be assigned to the parameter type '{1} Function(Object)' or '{1} Function(Object, StackTrace)'."
@@ -16119,6 +16172,7 @@
     problemMessage: "'{0}' is marked 'doNotStore' and shouldn't be assigned to a field or top-level variable."
     correctionMessage: Try removing the assignment.
     comment: Users should not assign values marked `@doNotStore`.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -16443,6 +16497,7 @@
     problemMessage: "Using the 'new' keyword in a comment reference is deprecated."
     correctionMessage: Try referring to a constructor by its name.
     comment: No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -16899,6 +16954,7 @@
       No parameters.
 
       https://github.com/dart-lang/sdk/issues/44063
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -16985,6 +17041,7 @@
       Parameters:
       0: the name of the annotation
       1: the list of valid targets
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -17012,6 +17069,7 @@
     comment: |-
       Parameters:
       0: the name of the element
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -17054,6 +17112,7 @@
     comment: |-
       Parameters:
       0: the name of the element
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -17102,6 +17161,7 @@
     comment: |-
       Parameters:
       0: The name of the method
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -17144,6 +17204,7 @@
     comment: |-
       Parameters:
       0: the name of the method
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -17192,6 +17253,7 @@
     problemMessage: "Only public elements in a package's private API can be annotated as being internal."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -17248,12 +17310,14 @@
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: "The language version override can't specify a version greater than the latest known language version: {0}.{1}."
     correctionMessage: Try removing the language version override.
+    hasPublishedDocs: true
   INVALID_LANGUAGE_VERSION_OVERRIDE_AT_SIGN:
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: "The Dart language version override number must begin with '@dart'."
     correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -17284,42 +17348,49 @@
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: The language version override must be specified before any declaration or directive.
     correctionMessage: Try moving the language version override to the top of the file.
+    hasPublishedDocs: true
   INVALID_LANGUAGE_VERSION_OVERRIDE_LOWER_CASE:
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: "The Dart language version override comment must be specified with the word 'dart' in all lower case."
     correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
   INVALID_LANGUAGE_VERSION_OVERRIDE_NUMBER:
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: "The Dart language version override comment must be specified with a version number, like '2.0', after the '=' character."
     correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
   INVALID_LANGUAGE_VERSION_OVERRIDE_PREFIX:
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: "The Dart language version override number can't be prefixed with a letter."
     correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
   INVALID_LANGUAGE_VERSION_OVERRIDE_TRAILING_CHARACTERS:
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: "The Dart language version override comment can't be followed by any non-whitespace characters."
     correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
   INVALID_LANGUAGE_VERSION_OVERRIDE_TWO_SLASHES:
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: The Dart language version override comment must be specified with exactly two slashes.
     correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
   INVALID_LANGUAGE_VERSION_OVERRIDE_EQUALS:
     sharedName: INVALID_LANGUAGE_VERSION_OVERRIDE
     problemMessage: "The Dart language version override comment must be specified with an '=' character."
     correctionMessage: "Specify a Dart language version override with a comment like '// @dart = 2.0'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
   INVALID_LITERAL_ANNOTATION:
     problemMessage: Only const constructors can have the `@literal` annotation.
     hasPublishedDocs: true
@@ -17500,6 +17571,7 @@
     comment: |-
       Parameters:
       0: the name of the member
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -18084,6 +18156,7 @@
     problemMessage: "This null-check will always throw an exception because the expression will always evaluate to 'null'."
     comment: |-
       No parameters.
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
@@ -18220,6 +18293,7 @@
       Parameters:
       0: the name of the annotated function being invoked
       1: the name of the function containing the return
+    hasPublishedDocs: true
     documentation: |-
       #### Description
 
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 8e6f415..1c92e8b 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -1730,6 +1730,7 @@
   problemMessage: "Field formal parameters can only be used in a constructor."
   correctionMessage: "Try removing 'this.'."
   analyzerCode: ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
+  hasPublishedDocs: true
   script:
     - "class C { void m(this.x); }"
 
diff --git a/tools/VERSION b/tools/VERSION
index 5169cdd..c429a9a 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
 MAJOR 2
 MINOR 17
 PATCH 0
-PRERELEASE 154
+PRERELEASE 155
 PRERELEASE_PATCH 0
\ No newline at end of file