Skip to content

Commit

Permalink
Fixes to make Travis Green (#17)
Browse files Browse the repository at this point in the history
* Remove unused import
* Only analyze lib and test dirs
  - work-around for dart-lang/sdk#26212
* enable a few more lints
* remove unused field
  • Loading branch information
kevmoo authored Jun 29, 2017
1 parent 49f123b commit 4b8d407
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion examples/route_guide/lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions examples/route_guide/lib/src/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion lib/src/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 0 additions & 2 deletions lib/src/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 4b8d407

Please sign in to comment.