Skip to content

Commit 3b67644

Browse files
authored
Merge pull request flutter#18 from srawlins/pedantic
Add example; bump pedantic
2 parents 713dec5 + b47ba88 commit 3b67644

File tree

5 files changed

+19
-22
lines changed

5 files changed

+19
-22
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: dart
22

33
dart:
4-
- 2.1.0
4+
- 2.1.1
55
- dev
66

77
dart_task:

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ import 'package:http_multi_server/http_multi_server.dart';
99
import 'package:shelf/shelf.dart' as shelf;
1010
import 'package:shelf/shelf_io.dart' as shelf_io;
1111
12-
void main() {
12+
void main() async {
1313
// Both http://127.0.0.1:8080 and http://[::1]:8080 will be bound to the same
1414
// server.
15-
HttpMultiServer.loopback(8080).then((server) {
16-
shelf_io.serveRequests(server, (request) {
17-
return new shelf.Response.ok("Hello, world!");
18-
});
15+
var server = await HttpMultiServer.loopback(8080);
16+
shelf_io.serveRequests(server, (request) {
17+
return shelf.Response.ok("Hello, world!");
1918
});
2019
}
2120
```

analysis_options.yaml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ analyzer:
44
implicit-casts: false
55
linter:
66
rules:
7-
- avoid_empty_else
8-
- avoid_init_to_null
97
- avoid_null_checks_in_equality_operators
108
- avoid_unused_constructor_parameters
119
- annotate_overrides
@@ -15,30 +13,18 @@ linter:
1513
- constant_identifier_names
1614
- control_flow_in_finally
1715
- directives_ordering
18-
- empty_catches
19-
- empty_constructor_bodies
2016
- empty_statements
2117
- hash_and_equals
2218
- implementation_imports
2319
- iterable_contains_unrelated_type
24-
- library_names
25-
- library_prefixes
2620
- list_remove_unrelated_type
2721
- non_constant_identifier_names
2822
- overridden_fields
2923
- package_api_docs
3024
- package_names
3125
- package_prefixed_library_names
32-
- prefer_equal_for_default_values
3326
- prefer_final_fields
3427
- prefer_generic_function_type_aliases
35-
- prefer_is_not_empty
36-
- slash_for_doc_comments
3728
- test_types_in_equals
3829
- throw_in_finally
39-
- type_init_formals
4030
- unnecessary_brace_in_string_interps
41-
- unnecessary_const
42-
- unnecessary_new
43-
- unrelated_type_equality_checks
44-
- valid_regexps

example/main.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import 'package:http_multi_server/http_multi_server.dart';
2+
import 'package:shelf/shelf.dart' as shelf;
3+
import 'package:shelf/shelf_io.dart' as shelf_io;
4+
5+
void main() async {
6+
// Both http://127.0.0.1:8080 and http://[::1]:8080 will be bound to the same
7+
// server.
8+
var server = await HttpMultiServer.loopback(8080);
9+
shelf_io.serveRequests(server, (request) {
10+
return shelf.Response.ok("Hello, world!");
11+
});
12+
}

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ author: Dart Team <[email protected]>
77
homepage: https://github.com/dart-lang/http_multi_server
88

99
environment:
10-
sdk: '>=2.1.0 <3.0.0'
10+
sdk: '>=2.1.1 <3.0.0'
1111

1212
dependencies:
1313
async: '>=1.2.0 <3.0.0'
1414

1515
dev_dependencies:
1616
http: ^0.12.0
17-
pedantic: ^1.4.0
17+
pedantic: ^1.8.0
1818
test: ^1.5.2

0 commit comments

Comments
 (0)