Skip to content

Commit 35a1bd6

Browse files
authored
update the repo analysis config (#962)
update the repo analysis config: - analyze `api_benchmark/` (w/o --fatal-infos) - ignore deprecated members for files in api_benchmark/ (to ignore use of dart:html and related apis)
1 parent d3f9ad1 commit 35a1bd6

File tree

7 files changed

+25
-8
lines changed

7 files changed

+25
-8
lines changed

.github/workflows/dart.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
4747
with:
4848
path: "~/.pub-cache/hosted"
49-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf;commands:analyze_1-analyze_2"
49+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf;commands:analyze_2-analyze_3"
5050
restore-keys: |
5151
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:protobuf
5252
os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0
@@ -73,14 +73,14 @@ jobs:
7373
if: "always() && steps.protobuf_pub_upgrade.conclusion == 'success'"
7474
working-directory: protobuf
7575
job_003:
76-
name: "format_analyze; linux; Dart dev; PKG: api_benchmark; `dart format --output=none --set-exit-if-changed .`, `./../tool/setup.sh`, `./compile_protos.sh`"
76+
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`"
7777
runs-on: ubuntu-latest
7878
steps:
7979
- name: Cache Pub hosted dependencies
8080
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
8181
with:
8282
path: "~/.pub-cache/hosted"
83-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:api_benchmark;commands:format-command_0-command_1"
83+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:api_benchmark;commands:format-command_0-command_1-analyze_0"
8484
restore-keys: |
8585
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:api_benchmark
8686
os:ubuntu-latest;pub-cache-hosted;sdk:dev
@@ -110,6 +110,10 @@ jobs:
110110
run: ./compile_protos.sh
111111
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
112112
working-directory: api_benchmark
113+
- name: api_benchmark; dart analyze
114+
run: dart analyze
115+
if: "always() && steps.api_benchmark_pub_upgrade.conclusion == 'success'"
116+
working-directory: api_benchmark
113117
job_004:
114118
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`"
115119
runs-on: ubuntu-latest
@@ -118,7 +122,7 @@ jobs:
118122
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
119123
with:
120124
path: "~/.pub-cache/hosted"
121-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks;commands:format-command_0-command_2-analyze_0"
125+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks;commands:format-command_0-command_2-analyze_1"
122126
restore-keys: |
123127
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:benchmarks
124128
os:ubuntu-latest;pub-cache-hosted;sdk:dev
@@ -160,7 +164,7 @@ jobs:
160164
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
161165
with:
162166
path: "~/.pub-cache/hosted"
163-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf;commands:format-analyze_0"
167+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf;commands:format-analyze_1"
164168
restore-keys: |
165169
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protobuf
166170
os:ubuntu-latest;pub-cache-hosted;sdk:dev
@@ -194,7 +198,7 @@ jobs:
194198
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
195199
with:
196200
path: "~/.pub-cache/hosted"
197-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin;commands:format-command_0-command_3-analyze_0"
201+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin;commands:format-command_0-command_3-analyze_1"
198202
restore-keys: |
199203
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:protoc_plugin
200204
os:ubuntu-latest;pub-cache-hosted;sdk:dev

api_benchmark/lib/dashboard.dart

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: deprecated_member_use
6+
57
import 'dart:async' show Future;
68
import 'dart:convert';
79
import 'dart:html';

api_benchmark/lib/dashboard_view.dart

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: deprecated_member_use
6+
57
import 'dart:async' show EventSink, Stream, StreamController;
68
import 'dart:html';
79

api_benchmark/mono_pkg.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ stages:
66
- format
77
- command: ./../tool/setup.sh
88
- command: ./compile_protos.sh
9+
- analyze:
910
sdk: dev

api_benchmark/web/props_browser.dart

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: deprecated_member_use
6+
57
import 'dart:html' show querySelector;
68

79
import 'package:api_benchmark/dashboard.dart' show showDashboard;

api_benchmark/web/readjson_browser.dart

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: deprecated_member_use
6+
57
import 'dart:html' show querySelector;
68

79
import 'package:api_benchmark/dashboard.dart' show showDashboard;

tool/ci.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,18 @@ for PKG in ${PKGS}; do
6464
echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m"
6565
case ${TASK} in
6666
analyze_0)
67+
echo 'dart analyze'
68+
dart analyze || EXIT_CODE=$?
69+
;;
70+
analyze_1)
6771
echo 'dart analyze --fatal-infos'
6872
dart analyze --fatal-infos || EXIT_CODE=$?
6973
;;
70-
analyze_1)
74+
analyze_2)
7175
echo 'dart analyze lib'
7276
dart analyze lib || EXIT_CODE=$?
7377
;;
74-
analyze_2)
78+
analyze_3)
7579
echo 'dart analyze test'
7680
dart analyze test || EXIT_CODE=$?
7781
;;

0 commit comments

Comments
 (0)