| 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 '../../../sdk/lib/_internal/libraries.dart'; | 7 import '../../../sdk/lib/_internal/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 | 10 |
| 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 and message kinds as | 20 // TODO(johnniwinther): Support canonical URIs as keys and message kinds as |
| 21 // values. | 21 // values. |
| 22 const Map<String, List<String>> WHITE_LIST = const { | 22 const Map<String, List<String>> WHITE_LIST = const { |
| 23 // The following notices go away when bugs 15417 is fixed. | |
| 24 "sdk/lib/core/map.dart": const [ | |
| 25 "Info: This is the method declaration."], | |
| 26 | |
| 27 // Bug 15417. | |
| 28 "sdk/lib/html/dart2js/html_dart2js.dart": const [""" | |
| 29 Warning: '_DataAttributeMap' doesn't implement 'addAll'. | |
| 30 Try adding an implementation of 'addAll'.""", """ | |
| 31 Warning: '_NamespacedAttributeMap' doesn't implement 'addAll'. | |
| 32 Try adding an implementation of 'addAll'.""", """ | |
| 33 Warning: '_ElementAttributeMap' doesn't implement 'addAll'. | |
| 34 Try adding an implementation of 'addAll'.""", """ | |
| 35 Warning: 'Window' doesn't implement 'clearInterval'. | |
| 36 Try adding an implementation of 'clearInterval'.""", """ | |
| 37 Warning: 'Window' doesn't implement 'clearTimeout'. | |
| 38 Try adding an implementation of 'clearTimeout'.""", """ | |
| 39 Warning: 'Window' doesn't implement 'setInterval'. | |
| 40 Try adding an implementation of 'setInterval'.""", """ | |
| 41 Warning: 'Window' doesn't implement 'setTimeout'. | |
| 42 Try adding an implementation of 'setTimeout'.""", """ | |
| 43 Warning: 'Storage' doesn't implement 'addAll'. | |
| 44 Try adding an implementation of 'addAll'.""", | |
| 45 "Info: This is the method declaration."], | |
| 46 }; | 23 }; |
| 47 | 24 |
| 48 void main() { | 25 void main() { |
| 49 var uriList = new List<Uri>(); | 26 var uriList = new List<Uri>(); |
| 50 LIBRARIES.forEach((String name, LibraryInfo info) { | 27 LIBRARIES.forEach((String name, LibraryInfo info) { |
| 51 if (info.documented) { | 28 if (info.documented) { |
| 52 uriList.add(new Uri(scheme: 'dart', path: name)); | 29 uriList.add(new Uri(scheme: 'dart', path: name)); |
| 53 } | 30 } |
| 54 }); | 31 }); |
| 55 asyncTest(() => analyze(uriList, WHITE_LIST)); | 32 asyncTest(() => analyze(uriList, WHITE_LIST)); |
| 56 } | 33 } |
| OLD | NEW |