OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 analyze_api; | 5 library analyze_api; |
6 | 6 |
7 import 'package:sdk_library_metadata/libraries.dart'; | 7 import 'package:sdk_library_metadata/libraries.dart'; |
8 import 'analyze_helper.dart'; | 8 import 'analyze_helper.dart'; |
9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
10 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; | 10 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; |
11 /** | 11 /** |
12 * Map of white-listed warnings and errors. | 12 * Map of white-listed warnings and errors. |
13 * | 13 * |
14 * Only add a white-listing together with a bug report to dartbug.com and add | 14 * Only add a white-listing together with a bug report to dartbug.com and add |
15 * the bug issue number as a comment on the white-listing. | 15 * the bug issue number as a comment on the white-listing. |
16 * | 16 * |
17 * Use an identifiable suffix of the file uri as key. Use a fixed substring of | 17 * Use an identifiable suffix of the file uri as key. Use a fixed substring of |
18 * the error/warning message in the list of white-listings for each file. | 18 * the error/warning message in the list of white-listings for each file. |
19 */ | 19 */ |
20 // TODO(johnniwinther): Support canonical URIs as keys. | 20 // TODO(johnniwinther): Support canonical URIs as keys. |
21 const Map<String, List<String>> WHITE_LIST = const { | 21 const Map<String, List<String>> WHITE_LIST = const { |
22 "html_dart2js.dart": const [ | |
23 // These suppressions are tracked by issue 25928. | |
24 "'KeyEvent' doesn't implement the getter 'sourceDevice'", | |
25 "'KeyEvent' doesn't implement the getter 'code'", | |
26 "'KeyEvent' doesn't implement the getter 'key'", | |
27 "No member named '_pageX' in class 'UIEvent'.", | |
28 "No member named '_pageY' in class 'UIEvent'.", | |
29 "No member named '_layerX' in class 'UIEvent'.", | |
30 "No member named '_layerY' in class 'UIEvent'.", | |
31 "No member named 'clipboardData' in class 'KeyboardEvent'.", | |
32 "No member named 'clipboardData' in class 'Event'." | |
33 ] | |
34 }; | 22 }; |
35 | 23 |
36 void main() { | 24 void main() { |
37 var uriList = new List<Uri>(); | 25 var uriList = new List<Uri>(); |
38 libraries.forEach((String name, LibraryInfo info) { | 26 libraries.forEach((String name, LibraryInfo info) { |
39 if (info.documented) { | 27 if (info.documented) { |
40 uriList.add(new Uri(scheme: 'dart', path: name)); | 28 uriList.add(new Uri(scheme: 'dart', path: name)); |
41 } | 29 } |
42 }); | 30 }); |
43 asyncTest(() => analyze(uriList, WHITE_LIST, mode: AnalysisMode.ALL)); | 31 asyncTest(() => analyze(uriList, WHITE_LIST, mode: AnalysisMode.ALL)); |
44 } | 32 } |
OLD | NEW |