Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the repo analysis config #962

Merged
merged 2 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions api_benchmark/lib/dashboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 2 additions & 0 deletions api_benchmark/lib/dashboard_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 1 addition & 0 deletions api_benchmark/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ stages:
- format
- command: ./../tool/setup.sh
- command: ./compile_protos.sh
- analyze:
sdk: dev
2 changes: 2 additions & 0 deletions api_benchmark/web/props_browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions api_benchmark/web/readjson_browser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 6 additions & 2 deletions tool/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
;;
Expand Down