Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Require Dart 2.19, use latest team lints #244

Merged
merged 1 commit into from
Jun 2, 2023
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## 2.12.0-dev
## 2.12.0-wip

- Require Dart 2.19

## 2.11.0

Expand Down
14 changes: 4 additions & 10 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
# https://dart.dev/guides/language/analysis-options
include: package:lints/recommended.yaml
include: package:dart_flutter_team_lints/analysis_options.yaml

analyzer:
language:
strict-casts: true
errors:
only_throw_errors: ignore
unawaited_futures: ignore

linter:
rules:
- always_declare_return_types
- avoid_dynamic_calls
- avoid_unused_constructor_parameters
- comment_references
- directives_ordering
- lines_longer_than_80_chars
- literal_only_boolean_expressions
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_runtimeType_toString
- omit_local_variable_types
- package_api_docs
- prefer_relative_imports
- prefer_single_quotes
- test_types_in_equals
- throw_in_finally
- type_annotate_public_apis
- unnecessary_lambdas
- use_super_parameters
1 change: 1 addition & 0 deletions lib/src/single_subscription_transformer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class SingleSubscriptionTransformer<S, T> extends StreamTransformerBase<S, T> {
// type parameter and avoid this conversion.
try {
controller.add(value as T);
// ignore: avoid_catching_errors
} on TypeError catch (error, stackTrace) {
controller.addError(error, stackTrace);
}
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: async
version: 2.12.0-dev
version: 2.12.0-wip
description: Utility functions and classes related to the 'dart:async' library.
repository: https://github.com/dart-lang/async

environment:
sdk: ">=2.18.0 <3.0.0"
sdk: '>=2.19.0 <4.0.0'

dependencies:
collection: ^1.15.0
meta: ^1.1.7

dev_dependencies:
dart_flutter_team_lints: ^1.0.0
fake_async: ^1.2.0
lints: ^2.0.0
stack_trace: ^1.10.0
test: ^1.16.0
2 changes: 2 additions & 0 deletions test/cancelable_operation_test.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: unawaited_futures

import 'dart:async';

import 'package:async/async.dart';
Expand Down
2 changes: 1 addition & 1 deletion test/sink_base_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class _IOSink extends IOSinkBase {
: _onAdd = onAdd ?? ((_) {}),
_onError = onError ?? ((_, [__]) {}),
_onClose = onClose ?? (() {}),
_onFlush = onFlush ?? (Future.value),
_onFlush = onFlush ?? Future.value,
super(encoding);

@override
Expand Down
2 changes: 2 additions & 0 deletions test/stream_splitter_test.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: unawaited_futures

import 'dart:async';

import 'package:async/async.dart';
Expand Down
6 changes: 0 additions & 6 deletions test/subscription_stream_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,3 @@ Stream<int> createErrorStream([Completer? onCancel]) async* {
}
}
}

Stream<int> createLongStream() async* {
for (var i = 0; i < 200; i++) {
yield i;
}
}
2 changes: 2 additions & 0 deletions test/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.

/// Helper utilities for testing.
library;

import 'dart:async';

import 'package:async/async.dart';
Expand Down