Skip to content

Commit da6953c

Browse files
authored
Update to latest lints and Dart SDK (#828)
1 parent 346a72d commit da6953c

File tree

88 files changed

+563
-577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+563
-577
lines changed

.github/workflows/dart.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ jobs:
3939
- name: mono_repo self validate
4040
run: dart pub global run mono_repo generate --validate
4141
job_002:
42-
name: "format_analyze; linux; Dart 2.12.0; PKG: protobuf; `dart analyze lib`, `dart analyze test`"
42+
name: "format_analyze; linux; Dart 2.19.0; PKG: protobuf; `dart analyze lib`, `dart analyze test`"
4343
runs-on: ubuntu-latest
4444
steps:
4545
- name: Cache Pub hosted dependencies
4646
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
4747
with:
4848
path: "~/.pub-cache/hosted"
49-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.12.0;packages:protobuf;commands:analyze_1-analyze_2"
49+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protobuf;commands:analyze_1-analyze_2"
5050
restore-keys: |
51-
os:ubuntu-latest;pub-cache-hosted;sdk:2.12.0;packages:protobuf
52-
os:ubuntu-latest;pub-cache-hosted;sdk:2.12.0
51+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protobuf
52+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0
5353
os:ubuntu-latest;pub-cache-hosted
5454
os:ubuntu-latest
5555
- name: Setup Dart SDK
5656
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
5757
with:
58-
sdk: "2.12.0"
58+
sdk: "2.19.0"
5959
- id: checkout
6060
name: Checkout repository
6161
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
@@ -233,23 +233,23 @@ jobs:
233233
if: "always() && steps.protoc_plugin_pub_upgrade.conclusion == 'success'"
234234
working-directory: protoc_plugin
235235
job_007:
236-
name: "run_tests; linux; Dart 2.12.0; PKG: protobuf; `dart test`"
236+
name: "run_tests; linux; Dart 2.19.0; PKG: protobuf; `dart test`"
237237
runs-on: ubuntu-latest
238238
steps:
239239
- name: Cache Pub hosted dependencies
240240
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
241241
with:
242242
path: "~/.pub-cache/hosted"
243-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.12.0;packages:protobuf;commands:test_0"
243+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protobuf;commands:test_0"
244244
restore-keys: |
245-
os:ubuntu-latest;pub-cache-hosted;sdk:2.12.0;packages:protobuf
246-
os:ubuntu-latest;pub-cache-hosted;sdk:2.12.0
245+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protobuf
246+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0
247247
os:ubuntu-latest;pub-cache-hosted
248248
os:ubuntu-latest
249249
- name: Setup Dart SDK
250250
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
251251
with:
252-
sdk: "2.12.0"
252+
sdk: "2.19.0"
253253
- id: checkout
254254
name: Checkout repository
255255
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
@@ -270,23 +270,23 @@ jobs:
270270
- job_005
271271
- job_006
272272
job_008:
273-
name: "run_tests; linux; Dart 2.17.0; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test`"
273+
name: "run_tests; linux; Dart 2.19.0; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test`"
274274
runs-on: ubuntu-latest
275275
steps:
276276
- name: Cache Pub hosted dependencies
277277
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
278278
with:
279279
path: "~/.pub-cache/hosted"
280-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:protoc_plugin;commands:command_0-command_3-test_0"
280+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protoc_plugin;commands:command_0-command_3-test_0"
281281
restore-keys: |
282-
os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:protoc_plugin
283-
os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0
282+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protoc_plugin
283+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0
284284
os:ubuntu-latest;pub-cache-hosted
285285
os:ubuntu-latest
286286
- name: Setup Dart SDK
287287
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
288288
with:
289-
sdk: "2.17.0"
289+
sdk: "2.19.0"
290290
- id: checkout
291291
name: Checkout repository
292292
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
@@ -397,23 +397,23 @@ jobs:
397397
- job_005
398398
- job_006
399399
job_011:
400-
name: "run_tests; osx; Dart 2.12.0; PKG: protobuf; `dart test`"
400+
name: "run_tests; osx; Dart 2.19.0; PKG: protobuf; `dart test`"
401401
runs-on: macos-latest
402402
steps:
403403
- name: Cache Pub hosted dependencies
404404
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
405405
with:
406406
path: "~/.pub-cache/hosted"
407-
key: "os:macos-latest;pub-cache-hosted;sdk:2.12.0;packages:protobuf;commands:test_0"
407+
key: "os:macos-latest;pub-cache-hosted;sdk:2.19.0;packages:protobuf;commands:test_0"
408408
restore-keys: |
409-
os:macos-latest;pub-cache-hosted;sdk:2.12.0;packages:protobuf
410-
os:macos-latest;pub-cache-hosted;sdk:2.12.0
409+
os:macos-latest;pub-cache-hosted;sdk:2.19.0;packages:protobuf
410+
os:macos-latest;pub-cache-hosted;sdk:2.19.0
411411
os:macos-latest;pub-cache-hosted
412412
os:macos-latest
413413
- name: Setup Dart SDK
414414
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
415415
with:
416-
sdk: "2.12.0"
416+
sdk: "2.19.0"
417417
- id: checkout
418418
name: Checkout repository
419419
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
@@ -471,13 +471,13 @@ jobs:
471471
- job_005
472472
- job_006
473473
job_013:
474-
name: "run_tests; windows; Dart 2.12.0; PKG: protobuf; `dart test`"
474+
name: "run_tests; windows; Dart 2.19.0; PKG: protobuf; `dart test`"
475475
runs-on: windows-latest
476476
steps:
477477
- name: Setup Dart SDK
478478
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
479479
with:
480-
sdk: "2.12.0"
480+
sdk: "2.19.0"
481481
- id: checkout
482482
name: Checkout repository
483483
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
@@ -525,23 +525,23 @@ jobs:
525525
- job_005
526526
- job_006
527527
job_015:
528-
name: "run_legacy_tests; linux; Dart 2.17.0; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test legacy_tests/generated_message_test.dart`"
528+
name: "run_legacy_tests; linux; Dart 2.19.0; PKG: protoc_plugin; `./../tool/setup.sh`, `make protos`, `dart test legacy_tests/generated_message_test.dart`"
529529
runs-on: ubuntu-latest
530530
steps:
531531
- name: Cache Pub hosted dependencies
532532
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
533533
with:
534534
path: "~/.pub-cache/hosted"
535-
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:protoc_plugin;commands:command_0-command_3-test_1"
535+
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protoc_plugin;commands:command_0-command_3-test_1"
536536
restore-keys: |
537-
os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:protoc_plugin
538-
os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0
537+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:protoc_plugin
538+
os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0
539539
os:ubuntu-latest;pub-cache-hosted
540540
os:ubuntu-latest
541541
- name: Setup Dart SDK
542542
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
543543
with:
544-
sdk: "2.17.0"
544+
sdk: "2.19.0"
545545
- id: checkout
546546
name: Checkout repository
547547
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab

analysis_options.yaml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
include: package:lints/recommended.yaml
1+
include: package:dart_flutter_team_lints/analysis_options.yaml
22

33
analyzer:
44
language:
55
strict-casts: true
6+
errors:
7+
lines_longer_than_80_chars: ignore
68

79
linter:
810
rules:
9-
- always_declare_return_types
1011
- avoid_bool_literals_in_conditional_expressions
11-
- camel_case_types
1212
- comment_references
13-
- directives_ordering
14-
- no_leading_underscores_for_local_identifiers
15-
- omit_local_variable_types
1613
- prefer_final_in_for_each
1714
- prefer_final_locals
1815
- prefer_relative_imports
19-
- prefer_single_quotes
20-
- prefer_spread_collections
21-
- sort_pub_dependencies
22-
- throw_in_finally
23-
- type_annotate_public_apis
24-
- unawaited_futures
16+
- use_super_parameters

api_benchmark/analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ include: ../analysis_options.yaml
33
analyzer:
44
language:
55
strict-casts: false
6+
errors:
7+
only_throw_errors: ignore

api_benchmark/lib/benchmarks/get_strings.dart

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

55
import '../benchmark.dart';
66
import '../generated/benchmark.pb.dart'
7-
show BenchmarkID, Request, Params, Sample;
7+
show BenchmarkID, Params, Request, Sample;
88
import '../generated/string_grid.pb.dart' as pb;
99

1010
/// A benchmark that accesses each value in a grid of string fields.

api_benchmark/lib/benchmarks/has_strings.dart

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

55
import '../benchmark.dart';
66
import '../generated/benchmark.pb.dart'
7-
show BenchmarkID, Request, Params, Sample;
7+
show BenchmarkID, Params, Request, Sample;
88
import '../generated/string_grid.pb.dart' as pb;
99

1010
/// A benchmark that checks the existence of each item in a grid of strings.

api_benchmark/lib/benchmarks/int32_json.dart

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

55
import '../benchmark.dart';
66
import '../generated/benchmark.pb.dart'
7-
show BenchmarkID, Request, Params, Sample;
7+
show BenchmarkID, Params, Request, Sample;
88
import '../generated/int32grid.pb.dart' as pb;
99

1010
/// A benchmark that deserializes a grid of int fields.

api_benchmark/lib/benchmarks/int64_json.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:fixnum/fixnum.dart' show Int64;
66

77
import '../benchmark.dart';
88
import '../generated/benchmark.pb.dart'
9-
show BenchmarkID, Request, Params, Sample;
9+
show BenchmarkID, Params, Request, Sample;
1010
import '../generated/int64grid.pb.dart' as pb;
1111

1212
/// A benchmark that deserializes a grid of int fields.

api_benchmark/lib/benchmarks/repeated_int32_json.dart

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

55
import '../benchmark.dart';
66
import '../generated/benchmark.pb.dart'
7-
show BenchmarkID, Request, Params, Sample;
7+
show BenchmarkID, Params, Request, Sample;
88
import '../generated/int32grid.pb.dart' as pb;
99

1010
/// A benchmark that deserializes a grid of repeated ints.

api_benchmark/lib/benchmarks/repeated_int64_json.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import 'package:fixnum/fixnum.dart';
66

77
import '../benchmark.dart';
88
import '../generated/benchmark.pb.dart'
9-
show BenchmarkID, Request, Params, Sample;
9+
show BenchmarkID, Params, Request, Sample;
1010
import '../generated/int64grid.pb.dart' as pb;
1111

1212
/// A benchmark that deserializes a grid of repeated ints.

api_benchmark/lib/benchmarks/repeated_string_json.dart

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

55
import '../benchmark.dart';
66
import '../generated/benchmark.pb.dart'
7-
show BenchmarkID, Request, Params, Sample;
7+
show BenchmarkID, Params, Request, Sample;
88
import '../generated/string_grid.pb.dart' as pb;
99

1010
/// A benchmark that deserializes a grid of string fields.

0 commit comments

Comments
 (0)