Chromium Code Reviews| 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:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'; | 8 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'; |
| 9 import 'analyze_helper.dart'; | 9 import 'analyze_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 'sdk/lib/_internal/compiler/implementation/constants.dart': | |
|
Johnni Winther
2013/06/28 14:14:55
Nice catch!
| |
| 24 const [ | |
| 25 'Hint: The class "PrimitiveConstant" overrides "operator==", ' | |
| 26 'but not "get hashCode".', | |
| 27 ], | |
| 28 'sdk/lib/_internal/compiler/implementation/dart_types.dart': | |
| 29 const [ | |
| 30 'Hint: The class "MalformedType" overrides "operator==", ' | |
| 31 'but not "get hashCode".', | |
| 32 'Hint: The class "InterfaceType" overrides "operator==", ' | |
| 33 'but not "get hashCode".', | |
| 34 'Hint: The class "TypedefType" overrides "operator==", ' | |
| 35 'but not "get hashCode".', | |
| 36 ], | |
| 37 | |
| 38 'sdk/lib/_internal/compiler/implementation/ssa/types.dart': | |
| 39 const [ | |
| 40 'Hint: The class "HBoundedType" overrides "operator==", ' | |
| 41 'but not "get hashCode".', | |
| 42 ], | |
| 43 'sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart': | |
| 44 const [ | |
| 45 'Hint: The class "IntValue" overrides "operator==", ' | |
| 46 'but not "get hashCode".', | |
| 47 'Hint: The class "InstructionValue" overrides "operator==", ' | |
| 48 'but not "get hashCode".', | |
| 49 'Hint: The class "AddValue" overrides "operator==", ' | |
| 50 'but not "get hashCode".', | |
| 51 'Hint: The class "SubtractValue" overrides "operator==", ' | |
| 52 'but not "get hashCode".', | |
| 53 'Hint: The class "NegateValue" overrides "operator==", ' | |
| 54 'but not "get hashCode".', | |
| 55 'Hint: The class "Range" overrides "operator==", ' | |
| 56 'but not "get hashCode".', | |
| 57 ], | |
| 58 'sdk/lib/_internal/compiler/implementation/tree/dartstring.dart': | |
| 59 const [ | |
| 60 'Hint: The class "DartString" overrides "operator==", ' | |
| 61 'but not "get hashCode".', | |
| 62 ], | |
| 63 'sdk/lib/_internal/compiler/implementation/types/container_type_mask.dart': | |
| 64 const [ | |
| 65 'Hint: The class "ContainerTypeMask" overrides "operator==", ' | |
| 66 'but not "get hashCode".', | |
| 67 ], | |
| 68 'sdk/lib/_internal/compiler/implementation/types/element_type_mask.dart': | |
| 69 const [ | |
| 70 'Hint: The class "ElementTypeMask" overrides "operator==", ' | |
| 71 'but not "get hashCode".', | |
| 72 ], | |
| 73 'sdk/lib/_internal/compiler/implementation/types/simple_types_inferrer.dart': | |
| 74 const [ | |
| 75 'Hint: The class "ArgumentsTypes" overrides "operator==", ' | |
| 76 'but not "get hashCode".', | |
| 77 ], | |
| 78 'sdk/lib/_internal/compiler/implementation/types/union_type_mask.dart': | |
| 79 const [ | |
| 80 'Hint: The class "UnionTypeMask" overrides "operator==", ' | |
| 81 'but not "get hashCode".', | |
| 82 ], | |
| 83 'sdk/lib/_internal/compiler/implementation/universe/side_effects.dart': | |
| 84 const [ | |
| 85 'Hint: The class "SideEffects" overrides "operator==", ' | |
| 86 'but not "get hashCode".', | |
| 87 ], | |
| 88 'sdk/lib/_internal/compiler/implementation/util/link.dart': | |
| 89 const [ | |
| 90 'Hint: The class "Link" overrides "operator==", ' | |
| 91 'but not "get hashCode".', | |
| 92 ], | |
| 93 'sdk/lib/_internal/compiler/implementation/util/link_implementation.dart': | |
| 94 const [ | |
| 95 'Hint: The class "LinkEntry" overrides "operator==", ' | |
| 96 'but not "get hashCode".', | |
| 97 ], | |
| 98 'sdk/lib/_internal/compiler/implementation/warnings.dart': | |
| 99 const [ | |
| 100 'Hint: The class "Message" overrides "operator==", ' | |
| 101 'but not "get hashCode".', | |
| 102 ], | |
| 23 }; | 103 }; |
| 24 | 104 |
| 25 void main() { | 105 void main() { |
| 26 var uri = currentDirectory.resolve( | 106 var uri = currentDirectory.resolve( |
| 27 'sdk/lib/_internal/compiler/implementation/dart2js.dart'); | 107 'sdk/lib/_internal/compiler/implementation/dart2js.dart'); |
| 28 analyze([uri], WHITE_LIST); | 108 analyze([uri], WHITE_LIST); |
| 29 } | 109 } |
| OLD | NEW |