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

Commit 72a64e4

Browse files
authored
Change the ci/analyze.sh script to analyze _all_ of the engine (#54779)
Closes flutter/flutter#152636. As of this PR, we no longer cherry-pick specific directories to run `dart analyze` on. A few trailing errors across the repo had to be fixed in this PR.
1 parent 241d7b4 commit 72a64e4

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

ci/analyze.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,22 @@ echo "Using dart from $DART_BIN"
5858
"$DART" --version
5959
echo ""
6060

61-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/ci"
62-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/flutter_frontend_server"
63-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/impeller/tessellator/dart"
64-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/gpu"
65-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/ui"
66-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/testing"
67-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/tools"
68-
61+
# The web SDK does not use pub_get_offline.py, so we need to run pub get first:
62+
echo "Running 'pub get' in the Web SDK"
6963
echo ""
70-
71-
# Check that dart libraries conform.
72-
echo "Checking the integrity of the Web SDK"
64+
(cd "$FLUTTER_DIR/lib/web_ui"; "$DART" pub --suppress-analytics get)
7365
(cd "$FLUTTER_DIR/web_sdk"; "$DART" pub --suppress-analytics get)
7466
(cd "$FLUTTER_DIR/web_sdk/web_test_utils"; "$DART" pub --suppress-analytics get)
7567
(cd "$FLUTTER_DIR/web_sdk/web_engine_tester"; "$DART" pub --suppress-analytics get)
7668

77-
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/web_sdk"
69+
# Check *all* the Dart code in the engine.
70+
echo "Analyzing the Flutter engine"
71+
echo ""
72+
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR"
73+
echo ""
7874

75+
# Check that dart libraries conform.
76+
echo "Checking the integrity of the Web SDK"
7977
WEB_SDK_TEST_FILES="$FLUTTER_DIR/web_sdk/test/*"
8078
for testFile in $WEB_SDK_TEST_FILES
8179
do

impeller/fixtures/dart_tests.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
// found in the LICENSE file.
44

55
import 'dart:typed_data';
6-
import 'dart:ui' as ui;
6+
7+
// ignore: avoid_relative_lib_imports
78
import '../../lib/gpu/lib/gpu.dart' as gpu;
89

910
void main() {}
1011

1112
@pragma('vm:entry-point')
1213
void sayHi() {
14+
// ignore: avoid_print
1315
print('Hi');
1416
}
1517

lib/web_ui/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77

88
dependencies:
99
js: ^0.7.0
10-
meta: ^1.7.0
10+
meta: ^1.14.0
1111
web_locale_keymap:
1212
path: ../../third_party/web_locale_keymap
1313

sky/packages/sky_engine/pubspec.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
name: sky_engine
2-
version: 0.0.99
3-
author: Flutter Authors <[email protected]>
4-
description: Dart SDK extensions for dart:ui
5-
homepage: http://flutter.io
6-
# sky_engine requires sdk_ext support in the analyzer which was added in 1.11.x
72
environment:
83
sdk: '>=3.2.0-0 <4.0.0'

0 commit comments

Comments
 (0)