Skip to content

Commit 4b8d407

Browse files
authored
Fixes to make Travis Green (#17)
* Remove unused import * Only analyze lib and test dirs - work-around for dart-lang/sdk#26212 * enable a few more lints * remove unused field
1 parent 49f123b commit 4b8d407

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ matrix:
1616
include:
1717
- dart: stable
1818
dart_task: dartfmt
19+
# Wish we could exclude `examples` in `analysis_options.yaml` but it seems
20+
# blocked by https://github.com/dart-lang/sdk/issues/26212
1921
- dart: dev
20-
dart_task: dartanalyzer
22+
dart_task: dartanalyzer lib test
2123

2224
# Only building master means that we don't run two builds for each pull request.
2325
branches:

analysis_options.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ analyzer:
66
# Lint rules and documentation, see http://dart-lang.github.io/linter/lints
77
linter:
88
rules:
9+
- avoid_init_to_null
910
- cancel_subscriptions
1011
- close_sinks
12+
- directives_ordering
1113
- hash_and_equals
1214
- iterable_contains_unrelated_type
1315
- list_remove_unrelated_type
1416
- prefer_final_fields
1517
- prefer_final_locals
18+
- prefer_is_not_empty
1619
- test_types_in_equals
1720
- unrelated_type_equality_checks
1821
- valid_regexps

examples/route_guide/lib/src/client.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import 'dart:math' show Random;
77

88
import 'package:grpc/grpc.dart';
99

10+
import 'common.dart';
1011
import 'generated/route_guide.pb.dart';
1112
import 'generated/route_guide.pbgrpc.dart';
12-
import 'common.dart';
1313

1414
class Client {
1515
ClientChannel channel;

examples/route_guide/lib/src/server.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// BSD-style license that can be found in the LICENSE file.
44

55
import 'dart:async';
6-
import 'dart:io';
76
import 'dart:math' show PI, atan2, cos, max, min, sin, sqrt;
87

98
import 'package:grpc/grpc.dart' as grpc;
@@ -66,7 +65,7 @@ class RouteGuideService extends RouteGuideServiceBase {
6665
int pointCount = 0;
6766
int featureCount = 0;
6867
double distance = 0.0;
69-
Point previous = null;
68+
Point previous;
7069
final timer = new Stopwatch();
7170

7271
await for (var location in request) {

lib/src/client.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class ClientMethod<Q, R> {
5555
class ClientCall<Q, R> implements Response {
5656
static final _methodPost = new Header.ascii(':method', 'POST');
5757
static final _schemeHttp = new Header.ascii(':scheme', 'http');
58-
static final _schemeHttps = new Header.ascii(':scheme', 'https');
5958
static final _contentTypeGrpc =
6059
new Header.ascii('content-type', 'application/grpc');
6160
static final _teTrailers = new Header.ascii('te', 'trailers');

lib/src/server.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import 'dart:async';
66
import 'dart:io';
77

8-
import 'package:meta/meta.dart';
9-
import 'package:http2/multiprotocol_server.dart';
108
import 'package:http2/transport.dart';
119

1210
import 'streams.dart';

0 commit comments

Comments
 (0)