Skip to content

Commit

Permalink
Merge pull request flutter#18 from srawlins/pedantic
Browse files Browse the repository at this point in the history
Add example; bump pedantic
  • Loading branch information
srawlins authored Sep 16, 2019
2 parents 713dec5 + b47ba88 commit 3b67644
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: dart

dart:
- 2.1.0
- 2.1.1
- dev

dart_task:
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import 'package:http_multi_server/http_multi_server.dart';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as shelf_io;
void main() {
void main() async {
// Both http://127.0.0.1:8080 and http://[::1]:8080 will be bound to the same
// server.
HttpMultiServer.loopback(8080).then((server) {
shelf_io.serveRequests(server, (request) {
return new shelf.Response.ok("Hello, world!");
});
var server = await HttpMultiServer.loopback(8080);
shelf_io.serveRequests(server, (request) {
return shelf.Response.ok("Hello, world!");
});
}
```
Expand Down
14 changes: 0 additions & 14 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ analyzer:
implicit-casts: false
linter:
rules:
- avoid_empty_else
- avoid_init_to_null
- avoid_null_checks_in_equality_operators
- avoid_unused_constructor_parameters
- annotate_overrides
Expand All @@ -15,30 +13,18 @@ linter:
- constant_identifier_names
- control_flow_in_finally
- directives_ordering
- empty_catches
- empty_constructor_bodies
- empty_statements
- hash_and_equals
- implementation_imports
- iterable_contains_unrelated_type
- library_names
- library_prefixes
- list_remove_unrelated_type
- non_constant_identifier_names
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_generic_function_type_aliases
- prefer_is_not_empty
- slash_for_doc_comments
- test_types_in_equals
- throw_in_finally
- type_init_formals
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_new
- unrelated_type_equality_checks
- valid_regexps
12 changes: 12 additions & 0 deletions example/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import 'package:http_multi_server/http_multi_server.dart';
import 'package:shelf/shelf.dart' as shelf;
import 'package:shelf/shelf_io.dart' as shelf_io;

void main() async {
// Both http://127.0.0.1:8080 and http://[::1]:8080 will be bound to the same
// server.
var server = await HttpMultiServer.loopback(8080);
shelf_io.serveRequests(server, (request) {
return shelf.Response.ok("Hello, world!");
});
}
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ author: Dart Team <[email protected]>
homepage: https://github.com/dart-lang/http_multi_server

environment:
sdk: '>=2.1.0 <3.0.0'
sdk: '>=2.1.1 <3.0.0'

dependencies:
async: '>=1.2.0 <3.0.0'

dev_dependencies:
http: ^0.12.0
pedantic: ^1.4.0
pedantic: ^1.8.0
test: ^1.5.2

0 comments on commit 3b67644

Please sign in to comment.