Prevent solo: true from being committed (flutter/engine#51712)

At some point, we inherited a change from the repo-level `analysis_options.yaml` that [allowed deprecated](https://github.com/flutter/engine/pull/50575) members to be used. We rely on that analyzer error to prevent `solo: true` from being committed in our tests ([example](c935c3ba36/lib/web_ui/test/ui/line_metrics_test.dart (L179)) of one that slipped recently).

This PR overrides the `deprecated_member_use` error to enable it inside the web engine.
This commit is contained in:
Mouad Debbar 2024-03-28 15:31:14 -04:00 committed by GitHub
parent 92d81bd47b
commit b0300e2fc2
2 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,12 @@
include: ../../analysis_options.yaml
analyzer:
errors:
# We need this in the web engine in order to prevent committing `solo: true`
# in tests.
deprecated_member_use: true
linter:
rules:
avoid_dynamic_calls: false

View File

@ -22,6 +22,7 @@ import 'package:shelf_web_socket/shelf_web_socket.dart';
import 'package:skia_gold_client/skia_gold_client.dart';
import 'package:stream_channel/stream_channel.dart';
// ignore: deprecated_member_use
import 'package:test_core/backend.dart' hide Compiler;
// TODO(ditman): Fix ignores when https://github.com/flutter/flutter/issues/143599 is resolved.
import 'package:test_core/src/runner/environment.dart'; // ignore: implementation_imports