From 04ba68eb91f50f8bd1db527c31c881b18c38f425 Mon Sep 17 00:00:00 2001 From: Moritz Date: Tue, 1 Oct 2024 04:46:38 -0400 Subject: [PATCH] Rev package:lints (#740) * Rev package:lints * Add changelog * Run CI on 3.5.0 * Test with 3.2.0 * Update .github/workflows/dart.yml Co-authored-by: Kevin Moore * Update .github/workflows/dart.yml Co-authored-by: Kevin Moore --------- Co-authored-by: Kevin Moore --- .github/workflows/dart.yml | 4 ++-- CHANGELOG.md | 1 + analysis_options.yaml | 21 ++++++++++++--------- lib/service_api.dart | 2 +- pubspec.yaml | 4 ++-- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index c80305b..ced3c7f 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - sdk: [3.2.0, dev] + sdk: [3.5, dev] steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 @@ -60,7 +60,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - sdk: [3.2.0, dev] + sdk: [3.5, dev] platform: [vm, chrome] exclude: # We only run Chrome tests on Linux. No need to run them diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f463fb..684f1d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * Small fixes, such as ports in testing and enabling `timeline_test.dart`. * When the keep alive manager runs into a timeout, it will finish the transport instead of closing the connection, as defined in the gRPC spec. +* Upgrade to `package:lints` version 5.0.0 and Dart SDK version 3.5.0. ## 4.0.1 diff --git a/analysis_options.yaml b/analysis_options.yaml index 92df2d3..5bcd150 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -9,12 +9,15 @@ analyzer: linter: rules: - - always_declare_return_types - - cancel_subscriptions - - close_sinks - - directives_ordering - - omit_local_variable_types - - prefer_final_locals - - prefer_single_quotes - - test_types_in_equals - - prefer_relative_imports + #true + always_declare_return_types: true + cancel_subscriptions: true + close_sinks: true + directives_ordering: true + omit_local_variable_types: true + prefer_final_locals: true + prefer_single_quotes: true + test_types_in_equals: true + prefer_relative_imports: true + #false + unintended_html_in_doc_comment: false diff --git a/lib/service_api.dart b/lib/service_api.dart index 53d056d..026b26b 100644 --- a/lib/service_api.dart +++ b/lib/service_api.dart @@ -16,7 +16,7 @@ /// Exports the minimum api to define server and client stubs. /// /// Mainly intended to be imported by generated code. -library service_api; +library; export 'src/client/call.dart' show CallOptions, MetadataProvider; export 'src/client/channel.dart' show ClientChannel; diff --git a/pubspec.yaml b/pubspec.yaml index e89e71a..8c393db 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ version: 4.0.2-wip repository: https://github.com/grpc/grpc-dart environment: - sdk: ^3.2.0 + sdk: ^3.5.0 dependencies: async: ^2.5.0 @@ -21,7 +21,7 @@ dependencies: dev_dependencies: build_runner: ^2.0.0 build_test: ^2.0.0 - lints: ^4.0.0 + lints: ^5.0.0 mockito: ^5.0.0 path: ^1.8.0 test: ^1.16.0