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

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: Test fix. 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/task/dart.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) 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 ListResultDescriptor<List<ErrorFilter>> CONFIGURED_ERROR_FILTERS =
24 new ListResultDescriptorImpl('configured.errors', const <ErrorFilter>[]);
25
26 /**
27 * A predicate used to potentially filter an [error].
28 *
29 * Returns `true` if this error should be filtered from analysis results.
30 */
31 typedef bool ErrorFilter(AnalysisError error);
32
33 /**
18 * An error discovered during the analysis of some Dart code. 34 * An error discovered during the analysis of some Dart code.
19 * 35 *
20 * See [AnalysisErrorListener]. 36 * See [AnalysisErrorListener].
21 */ 37 */
22 class AnalysisError { 38 class AnalysisError {
23 /** 39 /**
24 * An empty array of errors used when no errors are expected. 40 * An empty array of errors used when no errors are expected.
25 */ 41 */
26 static const List<AnalysisError> NO_ERRORS = const <AnalysisError>[]; 42 static const List<AnalysisError> NO_ERRORS = const <AnalysisError>[];
27 43
(...skipping 5053 matching lines...) Expand 10 before | Expand all | Expand 10 after
5081 * Initialize a newly created error code to have the given [name]. 5097 * Initialize a newly created error code to have the given [name].
5082 */ 5098 */
5083 const TodoCode(String name) : super(name, "{0}"); 5099 const TodoCode(String name) : super(name, "{0}");
5084 5100
5085 @override 5101 @override
5086 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 5102 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
5087 5103
5088 @override 5104 @override
5089 ErrorType get type => ErrorType.TODO; 5105 ErrorType get type => ErrorType.TODO;
5090 } 5106 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698