Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 4e6692c

Browse files
authored
Prevent solo: true from being committed (#51712)
At some point, we inherited a change from the repo-level `analysis_options.yaml` that [allowed deprecated](#50575) members to be used. We rely on that analyzer error to prevent `solo: true` from being committed in our tests ([example](https://github.com/flutter/engine/blob/b7dddee939f2429e5fd3574a63f9dfac4f486a33/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.
1 parent 44c7351 commit 4e6692c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/web_ui/analysis_options.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
include: ../../analysis_options.yaml
88

9+
analyzer:
10+
errors:
11+
# We need this in the web engine in order to prevent committing `solo: true`
12+
# in tests.
13+
deprecated_member_use: true
14+
915
linter:
1016
rules:
1117
avoid_dynamic_calls: false

lib/web_ui/dev/test_platform.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import 'package:shelf_web_socket/shelf_web_socket.dart';
2222
import 'package:skia_gold_client/skia_gold_client.dart';
2323
import 'package:stream_channel/stream_channel.dart';
2424

25+
// ignore: deprecated_member_use
2526
import 'package:test_core/backend.dart' hide Compiler;
2627
// TODO(ditman): Fix ignores when https://github.com/flutter/flutter/issues/143599 is resolved.
2728
import 'package:test_core/src/runner/environment.dart'; // ignore: implementation_imports

0 commit comments

Comments
 (0)