Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: pkg/analyzer/lib/src/services/lint.dart

Issue 962323002: remove unused imports (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/lib/src/generated/source_io.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library lint; 5 library lint;
6 6
7 import 'package:analyzer/src/generated/ast.dart'; 7 import 'package:analyzer/src/generated/ast.dart';
8 import 'package:analyzer/src/generated/utilities_general.dart';
9 import 'package:analyzer/src/generated/engine.dart'; 8 import 'package:analyzer/src/generated/engine.dart';
10 import 'package:analyzer/src/generated/error.dart'; 9 import 'package:analyzer/src/generated/error.dart';
11 import 'package:analyzer/src/generated/source.dart'; 10 import 'package:analyzer/src/generated/source.dart';
12 import 'package:analyzer/src/generated/visitors.dart'; 11 import 'package:analyzer/src/generated/visitors.dart';
13 12
14 13
15 /// Implementers contribute lint warnings via the provided error [reporter]. 14 /// Implementers contribute lint warnings via the provided error [reporter].
16 abstract class Linter { 15 abstract class Linter {
17 /// Used to report lint warnings. 16 /// Used to report lint warnings.
18 /// NOTE: this is set by the framework before visit begins. 17 /// NOTE: this is set by the framework before visit begins.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 }); 50 });
52 } 51 }
53 52
54 void _generate(CompilationUnit unit, Source source) { 53 void _generate(CompilationUnit unit, Source source) {
55 ErrorReporter errorReporter = new ErrorReporter(_errorListener, source); 54 ErrorReporter errorReporter = new ErrorReporter(_errorListener, source);
56 _linters.forEach((l) => l.reporter = errorReporter); 55 _linters.forEach((l) => l.reporter = errorReporter);
57 Iterable<AstVisitor> visitors = _linters.map((l) => l.getVisitor()); 56 Iterable<AstVisitor> visitors = _linters.map((l) => l.getVisitor());
58 unit.accept(new DelegatingAstVisitor(visitors.where((v) => v != null))); 57 unit.accept(new DelegatingAstVisitor(visitors.where((v) => v != null)));
59 } 58 }
60 } 59 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/source_io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698