Change the ci/analyze.sh script to analyze _all_ of the engine (flutter/engine#54779)

Closes https://github.com/flutter/flutter/issues/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.
This commit is contained in:
Matan Lurey
2024-08-26 13:35:08 -07:00
committed by GitHub
parent 324705f6cb
commit d54ae5d4e3
4 changed files with 14 additions and 19 deletions

View File

@@ -58,24 +58,22 @@ echo "Using dart from $DART_BIN"
"$DART" --version
echo ""
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/ci"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/flutter_frontend_server"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/impeller/tessellator/dart"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/gpu"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/lib/ui"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/testing"
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/tools"
# The web SDK does not use pub_get_offline.py, so we need to run pub get first:
echo "Running 'pub get' in the Web SDK"
echo ""
# Check that dart libraries conform.
echo "Checking the integrity of the Web SDK"
(cd "$FLUTTER_DIR/lib/web_ui"; "$DART" pub --suppress-analytics get)
(cd "$FLUTTER_DIR/web_sdk"; "$DART" pub --suppress-analytics get)
(cd "$FLUTTER_DIR/web_sdk/web_test_utils"; "$DART" pub --suppress-analytics get)
(cd "$FLUTTER_DIR/web_sdk/web_engine_tester"; "$DART" pub --suppress-analytics get)
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR/web_sdk"
# Check *all* the Dart code in the engine.
echo "Analyzing the Flutter engine"
echo ""
"$DART" analyze --suppress-analytics --fatal-infos --fatal-warnings "$FLUTTER_DIR"
echo ""
# Check that dart libraries conform.
echo "Checking the integrity of the Web SDK"
WEB_SDK_TEST_FILES="$FLUTTER_DIR/web_sdk/test/*"
for testFile in $WEB_SDK_TEST_FILES
do

View File

@@ -3,13 +3,15 @@
// found in the LICENSE file.
import 'dart:typed_data';
import 'dart:ui' as ui;
// ignore: avoid_relative_lib_imports
import '../../lib/gpu/lib/gpu.dart' as gpu;
void main() {}
@pragma('vm:entry-point')
void sayHi() {
// ignore: avoid_print
print('Hi');
}

View File

@@ -7,7 +7,7 @@ environment:
dependencies:
js: ^0.7.0
meta: ^1.7.0
meta: ^1.14.0
web_locale_keymap:
path: ../../third_party/web_locale_keymap

View File

@@ -1,8 +1,3 @@
name: sky_engine
version: 0.0.99
author: Flutter Authors <flutter-dev@googlegroups.com>
description: Dart SDK extensions for dart:ui
homepage: http://flutter.io
# sky_engine requires sdk_ext support in the analyzer which was added in 1.11.x
environment:
sdk: '>=3.2.0-0 <4.0.0'