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>
This commit is contained in:
Sam Rawlins 2023-03-01 21:17:49 +00:00 committed by Commit Queue
parent ad15774558
commit debe8c0d83
5 changed files with 20 additions and 6 deletions

View file

@ -14,14 +14,19 @@ analyzer:
# 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:

View file

@ -410,6 +410,8 @@ class CiderReplaceMatch {
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 FlutterWidgetState {
}
class RenameResponse {
// TODO(srawlins): Provide a deprecation message, or remove.
// ignore: provide_deprecation_message
@deprecated
final List<CiderSearchMatch> matches;
final CheckNameResponse checkName;

View file

@ -42,11 +42,6 @@ class AbstractContextTest with ResourceProviderMixin {
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 => [

View file

@ -390,6 +390,8 @@ abstract class IntegrationTest {
/// 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 @@ abstract class IntegrationTest {
/// 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 @@ abstract class IntegrationTest {
/// 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 @@ abstract class IntegrationTest {
/// 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 {

View file

@ -191,6 +191,8 @@ class CodegenInttestMethodsVisitor extends DartCodegenVisitor
toHtmlVisitor.describePayload(request.result, 'Returns');
}));
if (request.deprecated) {
writeln(' // TODO(srawlins): Provide a deprecation message, or remove.');
writeln(' // ignore: provide_deprecation_message');
writeln('@deprecated');
}