analysis_server: Enforce deprecation messages

Change-Id: If76355480d2f0e3a93a22fe2f5bdb2e3339df230
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286202
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
diff --git a/pkg/analysis_server/analysis_options.yaml b/pkg/analysis_server/analysis_options.yaml
index c9d601a..8ce4f2d 100644
--- a/pkg/analysis_server/analysis_options.yaml
+++ b/pkg/analysis_server/analysis_options.yaml
@@ -14,14 +14,19 @@
     # Lints from the recommended set that conflict w/ analyzer style or will
     # require some work to reach compliance.
     # See: https://github.com/dart-lang/sdk/issues/48785
+
+    # We have some long test class names which include one or more underscores
+    # to improve readability.
     camel_case_types: ignore
     constant_identifier_names: ignore
     file_names: ignore
+    # This package imports much of the implementation libraries of the
+    # 'analyzer' (and sometimes the '_fe_analyzer_shared' package), because it
+    # is tightly integrated. This will not likely change any time soon.
     implementation_imports: ignore
     non_constant_identifier_names: ignore
     overridden_fields: ignore
     prefer_void_to_null: ignore
-    provide_deprecation_message: ignore
 
 linter:
   rules:
diff --git a/pkg/analysis_server/lib/src/cider/rename.dart b/pkg/analysis_server/lib/src/cider/rename.dart
index ebb81cf..ad32649 100644
--- a/pkg/analysis_server/lib/src/cider/rename.dart
+++ b/pkg/analysis_server/lib/src/cider/rename.dart
@@ -410,6 +410,8 @@
 
 class FlutterWidgetRename {
   final String name;
+  // TODO(srawlins): Provide a deprecation message, or remove.
+  // ignore: provide_deprecation_message
   @deprecated
   final List<CiderSearchMatch> matches;
   final List<CiderReplaceMatch> replacements;
@@ -426,6 +428,8 @@
 }
 
 class RenameResponse {
+  // TODO(srawlins): Provide a deprecation message, or remove.
+  // ignore: provide_deprecation_message
   @deprecated
   final List<CiderSearchMatch> matches;
   final CheckNameResponse checkName;
diff --git a/pkg/analysis_server/test/abstract_context.dart b/pkg/analysis_server/test/abstract_context.dart
index 53cabfd..030522c 100644
--- a/pkg/analysis_server/test/abstract_context.dart
+++ b/pkg/analysis_server/test/abstract_context.dart
@@ -42,11 +42,6 @@
 
   List<String> get collectionIncludedPaths => [workspaceRootPath];
 
-  @deprecated
-  AnalysisDriver get driver {
-    throw 0;
-  }
-
   /// Return a list of the experiments that are to be enabled for tests in this
   /// class, an empty list if there are no experiments that should be enabled.
   List<String> get experiments => [
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
index b9ce0fcd..1fe1bee 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -390,6 +390,8 @@
   ///   from the URI "file:///bar.dart" to them. To check if a specific URI is
   ///   reachable from a given file, clients can check for its presence in the
   ///   resulting key set.
+  // TODO(srawlins): Provide a deprecation message, or remove.
+  // ignore: provide_deprecation_message
   @deprecated
   Future<AnalysisGetReachableSourcesResult> sendAnalysisGetReachableSources(
       String file) async {
@@ -644,6 +646,8 @@
   /// options: AnalysisOptions
   ///
   ///   The options that are to be used to control analysis.
+  // TODO(srawlins): Provide a deprecation message, or remove.
+  // ignore: provide_deprecation_message
   @deprecated
   Future<void> sendAnalysisUpdateOptions(AnalysisOptions options) async {
     var params = AnalysisUpdateOptionsParams(options).toJson();
@@ -1105,6 +1109,8 @@
   ///   from which the client is interested in receiving completion
   ///   suggestions. If one configured path is beneath another, the descendant
   ///   will override the ancestors' configured libraries of interest.
+  // TODO(srawlins): Provide a deprecation message, or remove.
+  // ignore: provide_deprecation_message
   @deprecated
   Future<void> sendCompletionRegisterLibraryPaths(
       List<LibraryPathSet> paths) async {
@@ -2329,6 +2335,8 @@
   /// subscriptions: List<ExecutionService>
   ///
   ///   A list of the services being subscribed to.
+  // TODO(srawlins): Provide a deprecation message, or remove.
+  // ignore: provide_deprecation_message
   @deprecated
   Future<void> sendExecutionSetSubscriptions(
       List<ExecutionService> subscriptions) async {
diff --git a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
index dfd35d9..cad2296 100644
--- a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
+++ b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
@@ -191,6 +191,8 @@
       toHtmlVisitor.describePayload(request.result, 'Returns');
     }));
     if (request.deprecated) {
+      writeln('  // TODO(srawlins): Provide a deprecation message, or remove.');
+      writeln('  // ignore: provide_deprecation_message');
       writeln('@deprecated');
     }