Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 648c580

Browse files
vicbtravis@travis-ci.org
authored andcommitted
chore: fix analyzer warnings
1 parent 0c2d1f6 commit 648c580

File tree

9 files changed

+10
-14
lines changed

9 files changed

+10
-14
lines changed

lib/angular_dynamic.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
library angular.app.dynamic;
77

88
import 'package:di/dynamic_injector.dart';
9-
import "package:angular/angular.dart";
9+
import 'package:angular/angular.dart';
1010
import 'package:angular/core/registry.dart';
11-
import "package:angular/core/parser/parser.dart" show ClosureMap;
11+
import 'package:angular/core/parser/parser.dart' show ClosureMap;
1212
import 'package:angular/change_detection/change_detection.dart';
1313
import 'package:angular/change_detection/dirty_checking_change_detector_dynamic.dart';
1414
import 'package:angular/core/registry_dynamic.dart';

lib/core/scope.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ class ScopeLocals implements Map {
9797
void operator []=(String name, value) {
9898
_scope[name] = value;
9999
}
100-
dynamic operator [](String name)
100+
dynamic operator [](String name) =>
101101
// as Map needed to clear Dart2js warning
102-
=> ((_locals.containsKey(name) ? _locals : _scope) as Map)[name];
102+
((_locals.containsKey(name) ? _locals : _scope) as Map)[name];
103103

104104
bool get isEmpty => _scope.isEmpty && _locals.isEmpty;
105105
bool get isNotEmpty => _scope.isNotEmpty || _locals.isNotEmpty;

lib/introspection.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@ library angular.introspection;
66
import 'dart:html' as dom;
77
import 'package:di/di.dart';
88
import 'package:angular/introspection_js.dart';
9-
import 'package:angular/introspection.dart';
109
import 'package:angular/core/module_internal.dart';
1110
import 'package:angular/core_dom/module_internal.dart';
12-
import 'package:angular/directive/module.dart';
1311

1412
/**
1513
* Return the closest [ElementProbe] object for a given [Element].

lib/introspection_js.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import 'package:di/di.dart';
77
import 'package:angular/introspection.dart';
88
import 'package:angular/core/module_internal.dart';
99
import 'package:angular/core_dom/module_internal.dart';
10-
import 'package:angular/directive/module.dart';
1110

1211
/**
1312
* A global write only variable which keeps track of objects attached to the

lib/tools/transformer/expression_generator.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
library angular.tools.transformer.expression_generator;
22

33
import 'dart:async';
4-
import 'dart:math' as math;
54
import 'package:analyzer/src/generated/element.dart';
65
import 'package:angular/core/parser/parser.dart';
76
import 'package:angular/tools/html_extractor.dart';
@@ -177,7 +176,7 @@ final Map<String, Symbol> symbols = ${generateSymbolMap(symbols)};
177176
return '{\n${lines.join(",\n")}\n}';
178177
}
179178

180-
generateSymbolMap(Set<Strings> symbols) {
179+
generateSymbolMap(Set<String> symbols) {
181180
var lines = symbols.map((key) => ' r"${key}": #$key');
182181
return '{\n${lines.join(",\n")}\n}';
183182
}

test/angular_spec.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ main() {
103103
};
104104

105105
var lib = currentMirrorSystem().findLibrary(new Symbol(libraryName));
106-
return extractSymbols(lib);;
106+
return extractSymbols(lib);
107107
}
108108

109109
var names;

test/animate/css_animate_spec.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ class MockAnimationLoop extends Mock implements AnimationLoop {
111111

112112
List<LoopedAnimation> animations = [];
113113

114-
play(LoopedAnimation animation) {
114+
void play(LoopedAnimation animation) {
115115
animations.add(animation);
116116
}
117117

118-
frame() {
118+
void frame() {
119119
for(var animation in animations) {
120120
animation.read(time);
121121
}

test/core_dom/ng_element_spec.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
library ng_element_spec;
22

33
import '../_specs.dart';
4-
import 'dart:html' as dom;
54

65
void main() {
76
describe('ngElement', () {

test/filter/order_by_spec.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ import '../_specs.dart';
66
class Name {
77
String firstName;
88
String lastName;
9-
Name({String this.firstName, String this.lastName});
9+
Name({this.firstName, this.lastName});
1010
operator ==(Name other) =>
1111
(firstName == other.firstName && lastName == other.lastName);
1212
String toString() => 'Name(firstName: $firstName, lastName: $lastName)';
13+
int get hashCode => firstName.hashCode + lastName.hashCode;
1314
}
1415

1516

0 commit comments

Comments
 (0)