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

Side by Side Diff: pkg/analyzer/lib/src/task/dart.dart

Issue 2933753002: Run the sorter to reduce code churn (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « pkg/analyzer/lib/src/lint/registry.dart ('k') | pkg/analyzer/lib/src/task/driver.dart » ('j') | 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 analyzer.src.task.dart; 5 library analyzer.src.task.dart;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/ast/standard_resolution_map.dart'; 10 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
(...skipping 3028 matching lines...) Expand 10 before | Expand all | Expand 10 after
3039 final Map<int, List<String>> _ignoreMap = new HashMap<int, List<String>>(); 3039 final Map<int, List<String>> _ignoreMap = new HashMap<int, List<String>>();
3040 3040
3041 final Set<String> _ignoreForFileSet = new HashSet<String>(); 3041 final Set<String> _ignoreForFileSet = new HashSet<String>();
3042 3042
3043 /** 3043 /**
3044 * Whether this info object defines any ignores. 3044 * Whether this info object defines any ignores.
3045 */ 3045 */
3046 bool get hasIgnores => ignores.isNotEmpty || _ignoreForFileSet.isNotEmpty; 3046 bool get hasIgnores => ignores.isNotEmpty || _ignoreForFileSet.isNotEmpty;
3047 3047
3048 /** 3048 /**
3049 * Iterable of error codes ignored for the whole file.
3050 */
3051 Iterable<String> get ignoreForFiles => _ignoreForFileSet;
3052
3053 /**
3049 * Map of line numbers to associated ignored error codes. 3054 * Map of line numbers to associated ignored error codes.
3050 */ 3055 */
3051 Map<int, Iterable<String>> get ignores => _ignoreMap; 3056 Map<int, Iterable<String>> get ignores => _ignoreMap;
3052 3057
3053 /** 3058 /**
3054 * Iterable of error codes ignored for the whole file.
3055 */
3056 Iterable<String> get ignoreForFiles => _ignoreForFileSet;
3057
3058 /**
3059 * Ignore this [errorCode] at [line]. 3059 * Ignore this [errorCode] at [line].
3060 */ 3060 */
3061 void add(int line, String errorCode) { 3061 void add(int line, String errorCode) {
3062 _ignoreMap.putIfAbsent(line, () => new List<String>()).add(errorCode); 3062 _ignoreMap.putIfAbsent(line, () => new List<String>()).add(errorCode);
3063 } 3063 }
3064 3064
3065 /** 3065 /**
3066 * Ignore these [errorCodes] at [line]. 3066 * Ignore these [errorCodes] at [line].
3067 */ 3067 */
3068 void addAll(int line, Iterable<String> errorCodes) { 3068 void addAll(int line, Iterable<String> errorCodes) {
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after
5871 5871
5872 @override 5872 @override
5873 bool moveNext() { 5873 bool moveNext() {
5874 if (_newSources.isEmpty) { 5874 if (_newSources.isEmpty) {
5875 return false; 5875 return false;
5876 } 5876 }
5877 currentTarget = _newSources.removeLast(); 5877 currentTarget = _newSources.removeLast();
5878 return true; 5878 return true;
5879 } 5879 }
5880 } 5880 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/lint/registry.dart ('k') | pkg/analyzer/lib/src/task/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698