Fixes to make Travis Green (#17)

* Remove unused import
* Only analyze lib and test dirs
  - work-around for https://github.com/dart-lang/sdk/issues/26212
* enable a few more lints
* remove unused field
This commit is contained in:
Kevin Moore 2017-06-29 13:11:29 -07:00 committed by GitHub
parent 49f123b6ac
commit 4b8d407eae
6 changed files with 8 additions and 7 deletions

View File

@ -16,8 +16,10 @@ matrix:
include:
- dart: stable
dart_task: dartfmt
# Wish we could exclude `examples` in `analysis_options.yaml` but it seems
# blocked by https://github.com/dart-lang/sdk/issues/26212
- dart: dev
dart_task: dartanalyzer
dart_task: dartanalyzer lib test
# Only building master means that we don't run two builds for each pull request.
branches:

View File

@ -6,13 +6,16 @@ analyzer:
# Lint rules and documentation, see http://dart-lang.github.io/linter/lints
linter:
rules:
- avoid_init_to_null
- cancel_subscriptions
- close_sinks
- directives_ordering
- hash_and_equals
- iterable_contains_unrelated_type
- list_remove_unrelated_type
- prefer_final_fields
- prefer_final_locals
- prefer_is_not_empty
- test_types_in_equals
- unrelated_type_equality_checks
- valid_regexps

View File

@ -7,9 +7,9 @@ import 'dart:math' show Random;
import 'package:grpc/grpc.dart';
import 'common.dart';
import 'generated/route_guide.pb.dart';
import 'generated/route_guide.pbgrpc.dart';
import 'common.dart';
class Client {
ClientChannel channel;

View File

@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import 'dart:io';
import 'dart:math' show PI, atan2, cos, max, min, sin, sqrt;
import 'package:grpc/grpc.dart' as grpc;
@ -66,7 +65,7 @@ class RouteGuideService extends RouteGuideServiceBase {
int pointCount = 0;
int featureCount = 0;
double distance = 0.0;
Point previous = null;
Point previous;
final timer = new Stopwatch();
await for (var location in request) {

View File

@ -55,7 +55,6 @@ class ClientMethod<Q, R> {
class ClientCall<Q, R> implements Response {
static final _methodPost = new Header.ascii(':method', 'POST');
static final _schemeHttp = new Header.ascii(':scheme', 'http');
static final _schemeHttps = new Header.ascii(':scheme', 'https');
static final _contentTypeGrpc =
new Header.ascii('content-type', 'application/grpc');
static final _teTrailers = new Header.ascii('te', 'trailers');

View File

@ -5,8 +5,6 @@
import 'dart:async';
import 'dart:io';
import 'package:meta/meta.dart';
import 'package:http2/multiprotocol_server.dart';
import 'package:http2/transport.dart';
import 'streams.dart';