OLD | NEW |
---|---|
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
Johnni Winther
2015/12/11 11:27:29
Why is the file called smoke_messages?
floitsch
2015/12/14 18:56:41
Maybe "smoke test" is not the best name.
The messa
| |
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 // The messages in this file should meet the following guide lines: | 5 // The messages in this file should meet the following guide lines: |
6 // | 6 // |
7 // 1. The message should be a complete sentence starting with an uppercase | 7 // 1. The message should be a complete sentence starting with an uppercase |
8 // letter, and ending with a period. | 8 // letter, and ending with a period. |
9 // | 9 // |
10 // 2. Reserved words and embedded identifiers should be in single quotes, so | 10 // 2. Reserved words and embedded identifiers should be in single quotes, so |
11 // prefer double quotes for the complete message. For example, "The | 11 // prefer double quotes for the complete message. For example, "The |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 // An INFO message should always be preceded by a non-INFO message, and the | 51 // An INFO message should always be preceded by a non-INFO message, and the |
52 // INFO messages are additional details about the preceding non-INFO | 52 // INFO messages are additional details about the preceding non-INFO |
53 // message. For example, consider duplicated elements. First report a WARNING | 53 // message. For example, consider duplicated elements. First report a WARNING |
54 // or ERROR about the duplicated element, and then report an INFO about the | 54 // or ERROR about the duplicated element, and then report an INFO about the |
55 // location of the existing element. | 55 // location of the existing element. |
56 // | 56 // |
57 // Generally, we want to provide messages that consists of three sentences: | 57 // Generally, we want to provide messages that consists of three sentences: |
58 // 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we | 58 // 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we |
59 // combine the first two in [template] and the last in [howToFix]. | 59 // combine the first two in [template] and the last in [howToFix]. |
60 | 60 |
61 /// Padding used before and between import chains in the message for | 61 final MESSAGES = { |
62 /// [MessageKind.IMPORT_EXPERIMENTAL_MIRRORS]. | |
63 const String IMPORT_EXPERIMENTAL_MIRRORS_PADDING = '\n* '; | |
64 | |
65 /// Padding used before and between import chains in the message for | |
66 /// [MessageKind.MIRRORS_LIBRARY_NOT_SUPPORT_BY_BACKEND]. | |
67 const String MIRRORS_NOT_SUPPORTED_BY_BACKEND_PADDING = '\n '; | |
68 | |
69 /// Padding used before and between import chains in the message for | |
70 /// [MessageKind.DISALLOWED_LIBRARY_IMPORT]. | |
71 const String DISALLOWED_LIBRARY_IMPORT_PADDING = '\n '; | |
72 | |
73 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; | |
74 | |
75 final Map<String, Map> MESSAGES = { | |
76 /// Do not use this. It is here for legacy and debugging. It violates item | 62 /// Do not use this. It is here for legacy and debugging. It violates item |
77 /// 4 of the guide lines for error messages in the beginning of the file. | 63 /// 4 of the guide lines for error messages in the beginning of the file. |
78 'GENERIC': {'id': 'SOWPSL', 'template': "#{text}",}, | 64 'GENERIC': {'id': 'SOWPSL', 'template': "#{text}",}, |
79 | 65 |
80 'NOT_ASSIGNABLE': { | 66 'NOT_ASSIGNABLE': { |
81 'id': 'VYNMAP', | 67 'id': 'VYNMAP', |
82 'template': "'#{fromType}' is not assignable to '#{toType}'.", | 68 'template': "'#{fromType}' is not assignable to '#{toType}'.", |
83 }, | 69 }, |
84 | 70 |
85 'FORIN_NOT_ASSIGNABLE': { | 71 'FORIN_NOT_ASSIGNABLE': { |
(...skipping 3620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3706 "more code and prevents the compiler from doing some optimizations.", | 3692 "more code and prevents the compiler from doing some optimizations.", |
3707 'howToFix': "Consider removing this 'noSuchMethod' implementation." | 3693 'howToFix': "Consider removing this 'noSuchMethod' implementation." |
3708 }, | 3694 }, |
3709 | 3695 |
3710 'UNRECOGNIZED_VERSION_OF_LOOKUP_MAP': { | 3696 'UNRECOGNIZED_VERSION_OF_LOOKUP_MAP': { |
3711 'id': 'OVAFEW', | 3697 'id': 'OVAFEW', |
3712 'template': "Unsupported version of package:lookup_map.", | 3698 'template': "Unsupported version of package:lookup_map.", |
3713 'howToFix': DONT_KNOW_HOW_TO_FIX | 3699 'howToFix': DONT_KNOW_HOW_TO_FIX |
3714 }, | 3700 }, |
3715 }; | 3701 }; |
OLD | NEW |