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

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 641883002: Remove PUB_SUGGESTION error type from analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.error; 8 library engine.error;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 2378 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 * by a Dart compiler before the erroneous code is executed. 2389 * by a Dart compiler before the erroneous code is executed.
2390 */ 2390 */
2391 static const ErrorType COMPILE_TIME_ERROR = const ErrorType('COMPILE_TIME_ERRO R', 2, ErrorSeverity.ERROR); 2391 static const ErrorType COMPILE_TIME_ERROR = const ErrorType('COMPILE_TIME_ERRO R', 2, ErrorSeverity.ERROR);
2392 2392
2393 /** 2393 /**
2394 * Checked mode compile-time errors are errors that preclude execution in chec ked mode. 2394 * Checked mode compile-time errors are errors that preclude execution in chec ked mode.
2395 */ 2395 */
2396 static const ErrorType CHECKED_MODE_COMPILE_TIME_ERROR = const ErrorType('CHEC KED_MODE_COMPILE_TIME_ERROR', 3, ErrorSeverity.INFO); 2396 static const ErrorType CHECKED_MODE_COMPILE_TIME_ERROR = const ErrorType('CHEC KED_MODE_COMPILE_TIME_ERROR', 3, ErrorSeverity.INFO);
2397 2397
2398 /** 2398 /**
2399 * Suggestions made in situations where the user has deviated from recommended pub programming
2400 * practices.
2401 */
2402 static const ErrorType PUB_SUGGESTION = const ErrorType('PUB_SUGGESTION', 4, E rrorSeverity.WARNING);
2403
2404 /**
2405 * Static warnings are those warnings reported by the static checker. They hav e no effect on 2399 * Static warnings are those warnings reported by the static checker. They hav e no effect on
2406 * execution. Static warnings must be provided by Dart compilers used during d evelopment. 2400 * execution. Static warnings must be provided by Dart compilers used during d evelopment.
2407 */ 2401 */
2408 static const ErrorType STATIC_WARNING = const ErrorType('STATIC_WARNING', 5, E rrorSeverity.WARNING); 2402 static const ErrorType STATIC_WARNING = const ErrorType('STATIC_WARNING', 4, E rrorSeverity.WARNING);
2409 2403
2410 /** 2404 /**
2411 * Many, but not all, static warnings relate to types, in which case they are known as static type 2405 * Many, but not all, static warnings relate to types, in which case they are known as static type
2412 * warnings. 2406 * warnings.
2413 */ 2407 */
2414 static const ErrorType STATIC_TYPE_WARNING = const ErrorType('STATIC_TYPE_WARN ING', 6, ErrorSeverity.WARNING); 2408 static const ErrorType STATIC_TYPE_WARNING = const ErrorType('STATIC_TYPE_WARN ING', 5, ErrorSeverity.WARNING);
2415 2409
2416 /** 2410 /**
2417 * Syntactic errors are errors produced as a result of input that does not con form to the grammar. 2411 * Syntactic errors are errors produced as a result of input that does not con form to the grammar.
2418 */ 2412 */
2419 static const ErrorType SYNTACTIC_ERROR = const ErrorType('SYNTACTIC_ERROR', 7, ErrorSeverity.ERROR); 2413 static const ErrorType SYNTACTIC_ERROR = const ErrorType('SYNTACTIC_ERROR', 6, ErrorSeverity.ERROR);
2420 2414
2421 /** 2415 /**
2422 * Angular specific semantic problems. 2416 * Angular specific semantic problems.
2423 */ 2417 */
2424 static const ErrorType ANGULAR = const ErrorType('ANGULAR', 8, ErrorSeverity.I NFO); 2418 static const ErrorType ANGULAR = const ErrorType('ANGULAR', 7, ErrorSeverity.I NFO);
2425 2419
2426 /** 2420 /**
2427 * Polymer specific semantic problems. 2421 * Polymer specific semantic problems.
2428 */ 2422 */
2429 static const ErrorType POLYMER = const ErrorType('POLYMER', 9, ErrorSeverity.I NFO); 2423 static const ErrorType POLYMER = const ErrorType('POLYMER', 8, ErrorSeverity.I NFO);
2430 2424
2431 static const List<ErrorType> values = const [ 2425 static const List<ErrorType> values = const [
2432 TODO, 2426 TODO,
2433 HINT, 2427 HINT,
2434 COMPILE_TIME_ERROR, 2428 COMPILE_TIME_ERROR,
2435 CHECKED_MODE_COMPILE_TIME_ERROR, 2429 CHECKED_MODE_COMPILE_TIME_ERROR,
2436 PUB_SUGGESTION,
2437 STATIC_WARNING, 2430 STATIC_WARNING,
2438 STATIC_TYPE_WARNING, 2431 STATIC_TYPE_WARNING,
2439 SYNTACTIC_ERROR, 2432 SYNTACTIC_ERROR,
2440 ANGULAR, 2433 ANGULAR,
2441 POLYMER]; 2434 POLYMER];
2442 2435
2443 /** 2436 /**
2444 * The severity of this type of error. 2437 * The severity of this type of error.
2445 */ 2438 */
2446 final ErrorSeverity severity; 2439 final ErrorSeverity severity;
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2650 static const HintCode UNUSED_IMPORT = const HintCode.con1('UNUSED_IMPORT', 27, "Unused import"); 2643 static const HintCode UNUSED_IMPORT = const HintCode.con1('UNUSED_IMPORT', 27, "Unused import");
2651 2644
2652 /** 2645 /**
2653 * Hint for cases where the source expects a method or function to return a no n-void result, but 2646 * Hint for cases where the source expects a method or function to return a no n-void result, but
2654 * the method or function signature returns void. 2647 * the method or function signature returns void.
2655 * 2648 *
2656 * @param name the name of the method or function that returns void 2649 * @param name the name of the method or function that returns void
2657 */ 2650 */
2658 static const HintCode USE_OF_VOID_RESULT = const HintCode.con1('USE_OF_VOID_RE SULT', 28, "The result of '{0}' is being used, even though it is declared to be 'void'"); 2651 static const HintCode USE_OF_VOID_RESULT = const HintCode.con1('USE_OF_VOID_RE SULT', 28, "The result of '{0}' is being used, even though it is declared to be 'void'");
2659 2652
2653 /**
2654 * It is a bad practice for a source file in a package "lib" directory hierarc hy to traverse
2655 * outside that directory hierarchy. For example, a source file in the "lib" d irectory should not
2656 * contain a directive such as `import '../web/some.dart'` which references a file outside
2657 * the lib directory.
2658 */
2659 static const HintCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = const H intCode.con1('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 29, "A file in th e 'lib' directory hierarchy should not reference a file outside that hierarchy") ;
2660
2661 /**
2662 * It is a bad practice for a source file ouside a package "lib" directory hie rarchy to traverse
2663 * into that directory hierarchy. For example, a source file in the "web" dire ctory should not
2664 * contain a directive such as `import '../lib/some.dart'` which references a file inside
2665 * the lib directory.
2666 */
2667 static const HintCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = const H intCode.con1('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 30, "A file outsi de the 'lib' directory hierarchy should not reference a file inside that hierarc hy. Use a package: reference instead.");
2668
2669 /**
2670 * It is a bad practice for a package import to reference anything outside the given package, or
2671 * more generally, it is bad practice for a package import to contain a "..". For example, a
2672 * source file should not contain a directive such as `import 'package:foo/../ some.dart'`.
2673 */
2674 static const HintCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = const HintCode.con1('P ACKAGE_IMPORT_CONTAINS_DOT_DOT', 31, "A package import should not contain '..'") ;
2675
2660 static const List<HintCode> values = const [ 2676 static const List<HintCode> values = const [
2661 ARGUMENT_TYPE_NOT_ASSIGNABLE, 2677 ARGUMENT_TYPE_NOT_ASSIGNABLE,
2662 DEAD_CODE, 2678 DEAD_CODE,
2663 DEAD_CODE_CATCH_FOLLOWING_CATCH, 2679 DEAD_CODE_CATCH_FOLLOWING_CATCH,
2664 DEAD_CODE_ON_CATCH_SUBTYPE, 2680 DEAD_CODE_ON_CATCH_SUBTYPE,
2665 DEPRECATED_MEMBER_USE, 2681 DEPRECATED_MEMBER_USE,
2666 DUPLICATE_IMPORT, 2682 DUPLICATE_IMPORT,
2667 DIVISION_OPTIMIZATION, 2683 DIVISION_OPTIMIZATION,
2668 IS_DOUBLE, 2684 IS_DOUBLE,
2669 IS_INT, 2685 IS_INT,
2670 IS_NOT_DOUBLE, 2686 IS_NOT_DOUBLE,
2671 IS_NOT_INT, 2687 IS_NOT_INT,
2672 IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, 2688 IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
2673 INVALID_ASSIGNMENT, 2689 INVALID_ASSIGNMENT,
2674 MISSING_RETURN, 2690 MISSING_RETURN,
2675 OVERRIDE_ON_NON_OVERRIDING_GETTER, 2691 OVERRIDE_ON_NON_OVERRIDING_GETTER,
2676 OVERRIDE_ON_NON_OVERRIDING_METHOD, 2692 OVERRIDE_ON_NON_OVERRIDING_METHOD,
2677 OVERRIDE_ON_NON_OVERRIDING_SETTER, 2693 OVERRIDE_ON_NON_OVERRIDING_SETTER,
2678 OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, 2694 OVERRIDE_EQUALS_BUT_NOT_HASH_CODE,
2679 TYPE_CHECK_IS_NOT_NULL, 2695 TYPE_CHECK_IS_NOT_NULL,
2680 TYPE_CHECK_IS_NULL, 2696 TYPE_CHECK_IS_NULL,
2681 UNDEFINED_GETTER, 2697 UNDEFINED_GETTER,
2682 UNDEFINED_METHOD, 2698 UNDEFINED_METHOD,
2683 UNDEFINED_OPERATOR, 2699 UNDEFINED_OPERATOR,
2684 UNDEFINED_SETTER, 2700 UNDEFINED_SETTER,
2685 UNNECESSARY_CAST, 2701 UNNECESSARY_CAST,
2686 UNNECESSARY_TYPE_CHECK_FALSE, 2702 UNNECESSARY_TYPE_CHECK_FALSE,
2687 UNNECESSARY_TYPE_CHECK_TRUE, 2703 UNNECESSARY_TYPE_CHECK_TRUE,
2688 UNUSED_IMPORT, 2704 UNUSED_IMPORT,
2689 USE_OF_VOID_RESULT]; 2705 USE_OF_VOID_RESULT,
2706 FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
2707 FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
2708 PACKAGE_IMPORT_CONTAINS_DOT_DOT];
2690 2709
2691 /** 2710 /**
2692 * The template used to create the message to be displayed for this error. 2711 * The template used to create the message to be displayed for this error.
2693 */ 2712 */
2694 final String message; 2713 final String message;
2695 2714
2696 /** 2715 /**
2697 * The template used to create the correction to be displayed for this error, or `null` if 2716 * The template used to create the correction to be displayed for this error, or `null` if
2698 * there is no correction information for this error. 2717 * there is no correction information for this error.
2699 */ 2718 */
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2831 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; 2850 ErrorSeverity get errorSeverity => ErrorSeverity.INFO;
2832 2851
2833 @override 2852 @override
2834 ErrorType get type => ErrorType.POLYMER; 2853 ErrorType get type => ErrorType.POLYMER;
2835 2854
2836 @override 2855 @override
2837 String get uniqueName => "${runtimeType.toString()}.${name}"; 2856 String get uniqueName => "${runtimeType.toString()}.${name}";
2838 } 2857 }
2839 2858
2840 /** 2859 /**
2841 * The enumeration `PubSuggestionCode` defines the suggestions used for reportin g deviations
2842 * from pub best practices. The convention for this class is for the name of the bad practice to
2843 * indicate the problem that caused the suggestion to be generated and for the m essage to explain
2844 * what is wrong and, when appropriate, how the situation can be corrected.
2845 */
2846 class PubSuggestionCode extends Enum<PubSuggestionCode> implements ErrorCode {
2847 /**
2848 * It is a bad practice for a source file in a package "lib" directory hierarc hy to traverse
2849 * outside that directory hierarchy. For example, a source file in the "lib" d irectory should not
2850 * contain a directive such as `import '../web/some.dart'` which references a file outside
2851 * the lib directory.
2852 */
2853 static const PubSuggestionCode FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE = const PubSuggestionCode.con1('FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE', 0, "A file in the 'lib' directory hierarchy should not reference a file outside that hierarchy");
2854
2855 /**
2856 * It is a bad practice for a source file ouside a package "lib" directory hie rarchy to traverse
2857 * into that directory hierarchy. For example, a source file in the "web" dire ctory should not
2858 * contain a directive such as `import '../lib/some.dart'` which references a file inside
2859 * the lib directory.
2860 */
2861 static const PubSuggestionCode FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE = const PubSuggestionCode.con1('FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE', 1, "A file outside the 'lib' directory hierarchy should not reference a file in side that hierarchy. Use a package: reference instead.");
2862
2863 /**
2864 * It is a bad practice for a package import to reference anything outside the given package, or
2865 * more generally, it is bad practice for a package import to contain a "..". For example, a
2866 * source file should not contain a directive such as `import 'package:foo/../ some.dart'`.
2867 */
2868 static const PubSuggestionCode PACKAGE_IMPORT_CONTAINS_DOT_DOT = const PubSugg estionCode.con1('PACKAGE_IMPORT_CONTAINS_DOT_DOT', 2, "A package import should n ot contain '..'");
2869
2870 static const List<PubSuggestionCode> values = const [
2871 FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
2872 FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
2873 PACKAGE_IMPORT_CONTAINS_DOT_DOT];
2874
2875 /**
2876 * The template used to create the message to be displayed for this error.
2877 */
2878 final String message;
2879
2880 /**
2881 * The template used to create the correction to be displayed for this error, or `null` if
2882 * there is no correction information for this error.
2883 */
2884 final String correction;
2885
2886 /**
2887 * Initialize a newly created error code to have the given message.
2888 *
2889 * @param message the message template used to create the message to be displa yed for the error
2890 */
2891 const PubSuggestionCode.con1(String name, int ordinal, String message) : this. con2(name, ordinal, message, null);
2892
2893 /**
2894 * Initialize a newly created error code to have the given message and correct ion.
2895 *
2896 * @param message the template used to create the message to be displayed for the error
2897 * @param correction the template used to create the correction to be displaye d for the error
2898 */
2899 const PubSuggestionCode.con2(String name, int ordinal, this.message, this.corr ection) : super(name, ordinal);
2900
2901 @override
2902 ErrorSeverity get errorSeverity => ErrorType.PUB_SUGGESTION.severity;
2903
2904 @override
2905 ErrorType get type => ErrorType.PUB_SUGGESTION;
2906
2907 @override
2908 String get uniqueName => "${runtimeType.toString()}.${name}";
2909 }
2910
2911 /**
2912 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat ic type 2860 * The enumeration `StaticTypeWarningCode` defines the error codes used for stat ic type
2913 * warnings. The convention for this class is for the name of the error code to indicate the problem 2861 * warnings. The convention for this class is for the name of the error code to indicate the problem
2914 * that caused the error to be generated and for the error message to explain wh at is wrong and, 2862 * that caused the error to be generated and for the error message to explain wh at is wrong and,
2915 * when appropriate, how the problem can be corrected. 2863 * when appropriate, how the problem can be corrected.
2916 */ 2864 */
2917 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error Code { 2865 class StaticTypeWarningCode extends Enum<StaticTypeWarningCode> implements Error Code {
2918 /** 2866 /**
2919 * 12.7 Lists: A fresh instance (7.6.1) <i>a</i>, of size <i>n</i>, whose clas s implements the 2867 * 12.7 Lists: A fresh instance (7.6.1) <i>a</i>, of size <i>n</i>, whose clas s implements the
2920 * built-in class <i>List&lt;E></i> is allocated. 2868 * built-in class <i>List&lt;E></i> is allocated.
2921 * 2869 *
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
4235 4183
4236 @override 4184 @override
4237 String get message => "{0}"; 4185 String get message => "{0}";
4238 4186
4239 @override 4187 @override
4240 ErrorType get type => ErrorType.TODO; 4188 ErrorType get type => ErrorType.TODO;
4241 4189
4242 @override 4190 @override
4243 String get uniqueName => "${runtimeType.toString()}.${name}"; 4191 String get uniqueName => "${runtimeType.toString()}.${name}";
4244 } 4192 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698