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

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1420363005: Error Suppression FTW. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Typo. Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 engine.error; 5 library engine.error;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/task/model.dart';
10 import 'package:analyzer/task/model.dart';
9 import 'package:source_span/source_span.dart'; 11 import 'package:source_span/source_span.dart';
10 12
11 import 'ast.dart' show AstNode; 13 import 'ast.dart' show AstNode;
12 import 'element.dart'; 14 import 'element.dart';
13 import 'java_core.dart'; 15 import 'java_core.dart';
14 import 'scanner.dart' show Token; 16 import 'scanner.dart' show Token;
15 import 'source.dart'; 17 import 'source.dart';
16 18
17 /** 19 /**
20 * The descriptor used to associate error filters with analysis contexts in
21 * configuration data.
22 */
23 final ResultDescriptor<List<ErrorFilter>> CONFIGURED_ERROR_FILTERS =
scheglov 2015/10/27 23:41:44 ListResultDescriptor
pquitslund 2015/10/28 15:56:44 Done.
24 new ResultDescriptorImpl('configured.errors', const <ErrorFilter>[]);
25
26 /**
27 * (For now) a predicate used to potentially filter an [error].
28 * In the future, may support changing severity as well.
scheglov 2015/10/27 23:41:44 Does returning `true` mean "include the value into
pquitslund 2015/10/28 15:56:44 Updated doc.
29 */
30 typedef bool ErrorFilter(AnalysisError error);
31
32 /**
18 * An error discovered during the analysis of some Dart code. 33 * An error discovered during the analysis of some Dart code.
19 * 34 *
20 * See [AnalysisErrorListener]. 35 * See [AnalysisErrorListener].
21 */ 36 */
22 class AnalysisError { 37 class AnalysisError {
23 /** 38 /**
24 * An empty array of errors used when no errors are expected. 39 * An empty array of errors used when no errors are expected.
25 */ 40 */
26 static const List<AnalysisError> NO_ERRORS = const <AnalysisError>[]; 41 static const List<AnalysisError> NO_ERRORS = const <AnalysisError>[];
27 42
(...skipping 5044 matching lines...) Expand 10 before | Expand all | Expand 10 after
5072 * Initialize a newly created error code to have the given [name]. 5087 * Initialize a newly created error code to have the given [name].
5073 */ 5088 */
5074 const TodoCode(String name) : super(name, "{0}"); 5089 const TodoCode(String name) : super(name, "{0}");
5075 5090
5076 @override 5091 @override
5077 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 5092 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
5078 5093
5079 @override 5094 @override
5080 ErrorType get type => ErrorType.TODO; 5095 ErrorType get type => ErrorType.TODO;
5081 } 5096 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698