From e84b96aad1a31e9cff02950e48a5dd6f8a7c23be Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 10 Feb 2025 09:38:46 -0800 Subject: [PATCH] update the repo analysis config --- .github/workflows/dart.yml | 16 ++++++++++------ api_benchmark/lib/dashboard.dart | 2 ++ api_benchmark/lib/dashboard_view.dart | 2 ++ api_benchmark/mono_pkg.yaml | 1 + api_benchmark/web/props_browser.dart | 2 ++ api_benchmark/web/readjson_browser.dart | 2 ++ tool/ci.sh | 8 ++++++-- 7 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index c9f6846e2..d69d08920 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -46,7 +46,7 @@ jobs: uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf;commands:analyze_1-analyze_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf;commands:analyze_2-analyze_3" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 @@ -73,14 +73,14 @@ jobs: if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'" working-directory: protobuf job_003: - name: "format_analyze; linux; Dart dev; PKG: api_benchmark; `dart format --output=none --set-exit-if-changed .`, `./../tool/setup.sh`, `./compile_protos.sh`" + name: "format_analyze; linux; Dart dev; PKG: api_benchmark; `dart format --output=none --set-exit-if-changed .`, `./../tool/setup.sh`, `./compile_protos.sh`, `dart analyze`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:api_benchmark;commands:format-command_0-command_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:api_benchmark;commands:format-command_0-command_1-analyze_0" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:api_benchmark os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -110,6 +110,10 @@ jobs: run: ./compile_protos.sh if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'" working-directory: api_benchmark + - name: api_benchmark; dart analyze + run: dart analyze + if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'" + working-directory: api_benchmark job_004: name: "format_analyze; linux; Dart dev; PKG: benchmarks; `dart format --output=none --set-exit-if-changed .`, `./../tool/setup.sh`, `./tool/compile_protos.sh`, `dart analyze --fatal-infos`" runs-on: ubuntu-latest @@ -118,7 +122,7 @@ jobs: uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks;commands:format-command_0-command_2-analyze_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks;commands:format-command_0-command_2-analyze_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -160,7 +164,7 @@ jobs: uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf;commands:format-analyze_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf;commands:format-analyze_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -194,7 +198,7 @@ jobs: uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin;commands:format-command_0-command_3-analyze_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin;commands:format-command_0-command_3-analyze_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin os:ubuntu-latest;pub-cache-hosted;sdk:dev diff --git a/api_benchmark/lib/dashboard.dart b/api_benchmark/lib/dashboard.dart index 395bd5c9e..991b79cab 100644 --- a/api_benchmark/lib/dashboard.dart +++ b/api_benchmark/lib/dashboard.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: deprecated_member_use + import 'dart:async' show Future; import 'dart:convert'; import 'dart:html'; diff --git a/api_benchmark/lib/dashboard_view.dart b/api_benchmark/lib/dashboard_view.dart index 5a8965963..7fe863392 100644 --- a/api_benchmark/lib/dashboard_view.dart +++ b/api_benchmark/lib/dashboard_view.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: deprecated_member_use + import 'dart:async' show EventSink, Stream, StreamController; import 'dart:html'; diff --git a/api_benchmark/mono_pkg.yaml b/api_benchmark/mono_pkg.yaml index c3046ef03..63ee3c474 100644 --- a/api_benchmark/mono_pkg.yaml +++ b/api_benchmark/mono_pkg.yaml @@ -6,4 +6,5 @@ stages: - format - command: ./../tool/setup.sh - command: ./compile_protos.sh + - analyze: sdk: dev diff --git a/api_benchmark/web/props_browser.dart b/api_benchmark/web/props_browser.dart index 077ae9d5f..9945f76a6 100644 --- a/api_benchmark/web/props_browser.dart +++ b/api_benchmark/web/props_browser.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: deprecated_member_use + import 'dart:html' show querySelector; import 'package:api_benchmark/dashboard.dart' show showDashboard; diff --git a/api_benchmark/web/readjson_browser.dart b/api_benchmark/web/readjson_browser.dart index aa380e683..c292ab5bf 100644 --- a/api_benchmark/web/readjson_browser.dart +++ b/api_benchmark/web/readjson_browser.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// ignore_for_file: deprecated_member_use + import 'dart:html' show querySelector; import 'package:api_benchmark/dashboard.dart' show showDashboard; diff --git a/tool/ci.sh b/tool/ci.sh index 987255104..76b74b8bd 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -64,14 +64,18 @@ for PKG in ${PKGS}; do echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m" case ${TASK} in analyze_0) + echo 'dart analyze' + dart analyze || EXIT_CODE=$? + ;; + analyze_1) echo 'dart analyze --fatal-infos' dart analyze --fatal-infos || EXIT_CODE=$? ;; - analyze_1) + analyze_2) echo 'dart analyze lib' dart analyze lib || EXIT_CODE=$? ;; - analyze_2) + analyze_3) echo 'dart analyze test' dart analyze test || EXIT_CODE=$? ;;