switch to package:lints
diff --git a/README.md b/README.md
index ac6927e..da27074 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,7 @@
+[![Dart CI](https://github.com/dart-lang/http_multi_server/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/http_multi_server/actions/workflows/test-package.yml)
+[![pub package](https://img.shields.io/pub/v/http_multi_server.svg)](https://pub.dev/packages/http_multi_server)
+[![package publisher](https://img.shields.io/pub/publisher/http_multi_server.svg)](https://pub.dev/packages/http_multi_server/publisher)
+
An implementation of `dart:io`'s [HttpServer][] that wraps multiple servers and
forwards methods to all of them. It's useful for serving the same application on
multiple network interfaces while still having a unified way of controlling the
diff --git a/analysis_options.yaml b/analysis_options.yaml
index 027be6f..4fa4b8d 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -1,30 +1,5 @@
-include: package:pedantic/analysis_options.yaml
+include: package:lints/recommended.yaml
+
analyzer:
strong-mode:
implicit-casts: false
-linter:
- rules:
- - avoid_null_checks_in_equality_operators
- - avoid_unused_constructor_parameters
- - annotate_overrides
- - await_only_futures
- - camel_case_types
- - cancel_subscriptions
- - constant_identifier_names
- - control_flow_in_finally
- - directives_ordering
- - empty_statements
- - hash_and_equals
- - implementation_imports
- - iterable_contains_unrelated_type
- - list_remove_unrelated_type
- - non_constant_identifier_names
- - overridden_fields
- - package_api_docs
- - package_names
- - package_prefixed_library_names
- - prefer_final_fields
- - prefer_generic_function_type_aliases
- - test_types_in_equals
- - throw_in_finally
- - unnecessary_brace_in_string_interps
diff --git a/pubspec.yaml b/pubspec.yaml
index 7887732..65c0b0e 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -12,7 +12,7 @@
dev_dependencies:
http: ^0.13.0
- pedantic: ^1.10.0
+ lints: ^1.0.0
test: ^1.16.0
dependency_overrides:
diff --git a/test/http_multi_server_test.dart b/test/http_multi_server_test.dart
index 3a0bdcf..0591267 100644
--- a/test/http_multi_server_test.dart
+++ b/test/http_multi_server_test.dart
@@ -14,10 +14,11 @@
void main() {
group('with multiple HttpServers', () {
- var multiServer;
+ late HttpMultiServer multiServer;
late HttpServer subServer1;
late HttpServer subServer2;
late HttpServer subServer3;
+
setUp(() {
return Future.wait([
HttpServer.bind('localhost', 0).then((server) => subServer1 = server),
@@ -159,7 +160,8 @@
});
group('HttpMultiServer.loopback', () {
- var server;
+ late HttpServer server;
+
setUp(() {
return HttpMultiServer.loopback(0).then((s) => server = s);
});