OLD | NEW |
---|---|
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 library engine.error; | 5 library engine.error; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'package:analyzer/src/task/model.dart'; | 9 import 'package:analyzer/src/task/model.dart'; |
10 import 'package:analyzer/task/model.dart'; | 10 import 'package:analyzer/task/model.dart'; |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
343 | 343 |
344 /** | 344 /** |
345 * The error codes used for warnings in analysis options files. The convention | 345 * The error codes used for warnings in analysis options files. The convention |
346 * for this class is for the name of the error code to indicate the problem that | 346 * for this class is for the name of the error code to indicate the problem that |
347 * caused the error to be generated and for the error message to explain what is | 347 * caused the error to be generated and for the error message to explain what is |
348 * wrong and, when appropriate, how the problem can be corrected. | 348 * wrong and, when appropriate, how the problem can be corrected. |
349 */ | 349 */ |
350 class AnalysisOptionsWarningCode extends ErrorCode { | 350 class AnalysisOptionsWarningCode extends ErrorCode { |
351 /** | 351 /** |
352 * An error code indicating that a plugin is being configured with an | 352 * An error code indicating that a plugin is being configured with an |
353 * unsupported option. | 353 * unsupported option and legal options are provided. |
354 * | 354 * |
355 * Parameters: | 355 * Parameters: |
356 * 0: the plugin name | 356 * 0: the plugin name |
357 * 1: the unsupported option key | 357 * 1: the unsupported option key |
358 * 2: legal values | |
358 */ | 359 */ |
359 static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION = | 360 static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUES = |
360 const AnalysisOptionsWarningCode('UNSUPPORTED_OPTION_ERROR', | 361 const AnalysisOptionsWarningCode('UNSUPPORTED_OPTION_WITH_LEGAL_VALUES', |
361 "The option '{1}' is not supported by {0}"); | 362 "The option '{1}' is not supported by {0}, supported values are {2}"); |
363 | |
364 /** | |
365 * An error code indicating that a plugin is being configured with an | |
366 * unsupported option where there is just one legal value. | |
367 * | |
368 * Parameters: | |
369 * 0: the plugin name | |
370 * 1: the unsupported option key | |
371 * 2: the legal value | |
372 */ | |
373 static const AnalysisOptionsWarningCode UNSUPPORTED_OPTION_WITH_LEGAL_VALUE = | |
374 const AnalysisOptionsWarningCode('UNSUPPORTED_OPTION_WITH_LEGAL_VALUE', | |
375 "The option '{1}' is not supported by {0}, did you mean {2}?"); | |
376 | |
377 /** | |
378 * An error code indicating that an option entry is being configured with an | |
379 * unsupported value. | |
380 * | |
381 * Parameters: | |
382 * 0: the option name | |
383 * 1: the unsupported value | |
384 * 2: legal values | |
385 */ | |
386 static const AnalysisOptionsWarningCode UNSUPPORTED_VALUE = | |
387 const AnalysisOptionsWarningCode('UNSUPPORTED_VALUE_ERROR', | |
Brian Wilkerson
2015/10/28 23:31:06
Remove "_ERROR" or add it to the constant name. (K
pquitslund
2015/10/28 23:36:11
Done.
| |
388 "The value '{1}' is not supported by {0}, legal values are {2}"); | |
389 | |
390 /** | |
391 * An error code indicating that an unrecognized error code is being used to | |
392 * specify an error filter. | |
393 * | |
394 * Parameters: | |
395 * 0: the unrecognized error code | |
396 */ | |
397 static const AnalysisOptionsWarningCode UNRECOGNIZED_ERROR_CODE = | |
398 const AnalysisOptionsWarningCode('UNRECOGNIZED_ERROR_CODE_ERROR', | |
Brian Wilkerson
2015/10/28 23:31:06
Remove "_ERROR" or add it to the constant name.
pquitslund
2015/10/28 23:36:11
Done.
| |
399 "'{0}' is not a recognized error code"); | |
362 | 400 |
363 /** | 401 /** |
364 * Initialize a newly created warning code to have the given [name]. | 402 * Initialize a newly created warning code to have the given [name]. |
365 */ | 403 */ |
366 const AnalysisOptionsWarningCode(String name, String message, | 404 const AnalysisOptionsWarningCode(String name, String message, |
367 [String correction]) | 405 [String correction]) |
368 : super(name, message, correction); | 406 : super(name, message, correction); |
369 | 407 |
370 @override | 408 @override |
371 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; | 409 ErrorSeverity get errorSeverity => ErrorSeverity.WARNING; |
(...skipping 2126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2498 * Generally, we want to provide messages that consist of three sentences. From | 2536 * Generally, we want to provide messages that consist of three sentences. From |
2499 * the user's perspective these sentences should explain: | 2537 * the user's perspective these sentences should explain: |
2500 * 1. what is wrong, | 2538 * 1. what is wrong, |
2501 * 2. why is it wrong, and | 2539 * 2. why is it wrong, and |
2502 * 3. how do I fix it. | 2540 * 3. how do I fix it. |
2503 * However, we combine the first two in the [message] and the last in the | 2541 * However, we combine the first two in the [message] and the last in the |
2504 * [correction]. | 2542 * [correction]. |
2505 */ | 2543 */ |
2506 abstract class ErrorCode { | 2544 abstract class ErrorCode { |
2507 /** | 2545 /** |
2546 * Engine error code values. | |
2547 */ | |
2548 static const List<ErrorCode> values = const [ | |
2549 // | |
2550 // Manually generated. FWIW, this get's you most of the way there: | |
2551 // | |
2552 // > grep 'static const .*Code' error.dart | awk '{print $3"."$4","}' | |
Brian Wilkerson
2015/10/28 23:31:06
Unfortunately, not all of the errors are defined i
pquitslund
2015/10/28 23:36:11
Ha! I knew you would point that out. My thinking
Brian Wilkerson
2015/10/28 23:45:18
Well, I have to wonder about the reasonableness of
| |
2553 // | |
2554 AnalysisOptionsErrorCode.PARSE_ERROR, | |
2555 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE, | |
2556 AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES, | |
2557 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH, | |
2558 CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH, | |
2559 CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE, | |
2560 CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, | |
2561 CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, | |
2562 CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, | |
2563 CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH, | |
2564 CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD, | |
2565 CompileTimeErrorCode.AMBIGUOUS_EXPORT, | |
2566 CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER, | |
2567 CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, | |
2568 CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, | |
2569 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE, | |
2570 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME, | |
2571 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME, | |
2572 CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME, | |
2573 CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | |
2574 CompileTimeErrorCode.COMPILE_TIME_CONSTANT_RAISES_EXCEPTION, | |
2575 CompileTimeErrorCode.CONFLICTING_GETTER_AND_METHOD, | |
2576 CompileTimeErrorCode.CONFLICTING_METHOD_AND_GETTER, | |
2577 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_FIELD, | |
2578 CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_NAME_AND_METHOD, | |
2579 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS, | |
2580 CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER, | |
2581 CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION, | |
2582 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST, | |
2583 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN, | |
2584 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER, | |
2585 CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD, | |
2586 CompileTimeErrorCode.CONST_DEFERRED_CLASS, | |
2587 CompileTimeErrorCode.CONST_FORMAL_PARAMETER, | |
2588 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE, | |
2589 CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED _LIBRARY, | |
2590 CompileTimeErrorCode.CONST_INSTANCE_FIELD, | |
2591 CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS, | |
2592 CompileTimeErrorCode.CONST_NOT_INITIALIZED, | |
2593 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL, | |
2594 CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING, | |
2595 CompileTimeErrorCode.CONST_EVAL_TYPE_INT, | |
2596 CompileTimeErrorCode.CONST_EVAL_TYPE_NUM, | |
2597 CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, | |
2598 CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE, | |
2599 CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS, | |
2600 CompileTimeErrorCode.CONST_WITH_NON_CONST, | |
2601 CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT, | |
2602 CompileTimeErrorCode.CONST_WITH_NON_TYPE, | |
2603 CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS, | |
2604 CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR, | |
2605 CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, | |
2606 CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS, | |
2607 CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER, | |
2608 CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR, | |
2609 CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT, | |
2610 CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME, | |
2611 CompileTimeErrorCode.DUPLICATE_DEFINITION, | |
2612 CompileTimeErrorCode.DUPLICATE_DEFINITION_INHERITANCE, | |
2613 CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT, | |
2614 CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY, | |
2615 CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY, | |
2616 CompileTimeErrorCode.EXTENDS_ENUM, | |
2617 CompileTimeErrorCode.EXTENDS_NON_CLASS, | |
2618 CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS, | |
2619 CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS, | |
2620 CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS, | |
2621 CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS, | |
2622 CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER, | |
2623 CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES, | |
2624 CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR, | |
2625 CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR, | |
2626 CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR, | |
2627 CompileTimeErrorCode.GETTER_AND_METHOD_WITH_SAME_NAME, | |
2628 CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS, | |
2629 CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS, | |
2630 CompileTimeErrorCode.IMPLEMENTS_DYNAMIC, | |
2631 CompileTimeErrorCode.IMPLEMENTS_ENUM, | |
2632 CompileTimeErrorCode.IMPLEMENTS_NON_CLASS, | |
2633 CompileTimeErrorCode.IMPLEMENTS_REPEATED, | |
2634 CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS, | |
2635 CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER, | |
2636 CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, | |
2637 CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY, | |
2638 CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES, | |
2639 CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD, | |
2640 CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD, | |
2641 CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD, | |
2642 CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD, | |
2643 CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY, | |
2644 CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC, | |
2645 CompileTimeErrorCode.INSTANTIATE_ENUM, | |
2646 CompileTimeErrorCode.INVALID_ANNOTATION, | |
2647 CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY, | |
2648 CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC, | |
2649 CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR, | |
2650 CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER, | |
2651 CompileTimeErrorCode.INVALID_CONSTANT, | |
2652 CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME, | |
2653 CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS, | |
2654 CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS, | |
2655 CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST, | |
2656 CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP, | |
2657 CompileTimeErrorCode.INVALID_URI, | |
2658 CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE, | |
2659 CompileTimeErrorCode.LABEL_UNDEFINED, | |
2660 CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME, | |
2661 CompileTimeErrorCode.METHOD_AND_GETTER_WITH_SAME_NAME, | |
2662 CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL, | |
2663 CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL, | |
2664 CompileTimeErrorCode.MISSING_ENUM_CONSTANT_IN_SWITCH, | |
2665 CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR, | |
2666 CompileTimeErrorCode.MIXIN_DEFERRED_CLASS, | |
2667 CompileTimeErrorCode.MIXIN_HAS_NO_CONSTRUCTORS, | |
2668 CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT, | |
2669 CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS, | |
2670 CompileTimeErrorCode.MIXIN_OF_ENUM, | |
2671 CompileTimeErrorCode.MIXIN_OF_NON_CLASS, | |
2672 CompileTimeErrorCode.MIXIN_REFERENCES_SUPER, | |
2673 CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS, | |
2674 CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS, | |
2675 CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS, | |
2676 CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS, | |
2677 CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT, | |
2678 CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT, | |
2679 CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT, | |
2680 CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION, | |
2681 CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY, | |
2682 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE, | |
2683 CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY, | |
2684 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT, | |
2685 CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY, | |
2686 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY, | |
2687 CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY, | |
2688 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE, | |
2689 CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY, | |
2690 CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR, | |
2691 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER, | |
2692 CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY , | |
2693 CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS, | |
2694 CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR, | |
2695 CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS, | |
2696 CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR, | |
2697 CompileTimeErrorCode.PART_OF_NON_PART, | |
2698 CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER, | |
2699 CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT, | |
2700 CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, | |
2701 CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT, | |
2702 CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT, | |
2703 CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT, | |
2704 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE, | |
2705 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_EXTENDS, | |
2706 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_IMPLEMENTS, | |
2707 CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_BASE_CASE_WITH, | |
2708 CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR, | |
2709 CompileTimeErrorCode.REDIRECT_TO_NON_CLASS, | |
2710 CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR, | |
2711 CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR, | |
2712 CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR, | |
2713 CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION, | |
2714 CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH, | |
2715 CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR, | |
2716 CompileTimeErrorCode.RETURN_IN_GENERATOR, | |
2717 CompileTimeErrorCode.SHARED_DEFERRED_PREFIX, | |
2718 CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT, | |
2719 CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR, | |
2720 CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT, | |
2721 CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, | |
2722 CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF, | |
2723 CompileTimeErrorCode.UNDEFINED_CLASS, | |
2724 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER, | |
2725 CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT, | |
2726 CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER, | |
2727 CompileTimeErrorCode.URI_DOES_NOT_EXIST, | |
2728 CompileTimeErrorCode.URI_WITH_INTERPOLATION, | |
2729 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR, | |
2730 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS, | |
2731 CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER, | |
2732 CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR, | |
2733 CompileTimeErrorCode.YIELD_IN_NON_GENERATOR, | |
2734 HintCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, | |
2735 HintCode.DEAD_CODE, | |
2736 HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH, | |
2737 HintCode.DEAD_CODE_ON_CATCH_SUBTYPE, | |
2738 HintCode.DEPRECATED_MEMBER_USE, | |
2739 HintCode.DUPLICATE_IMPORT, | |
2740 HintCode.DIVISION_OPTIMIZATION, | |
2741 HintCode.IS_DOUBLE, | |
2742 HintCode.IS_INT, | |
2743 HintCode.IS_NOT_DOUBLE, | |
2744 HintCode.IS_NOT_INT, | |
2745 HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION, | |
2746 HintCode.INVALID_ASSIGNMENT, | |
2747 HintCode.MISSING_RETURN, | |
2748 HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER, | |
2749 HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD, | |
2750 HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER, | |
2751 HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE, | |
2752 HintCode.TYPE_CHECK_IS_NOT_NULL, | |
2753 HintCode.TYPE_CHECK_IS_NULL, | |
2754 HintCode.UNDEFINED_GETTER, | |
2755 HintCode.UNDEFINED_METHOD, | |
2756 HintCode.UNDEFINED_OPERATOR, | |
2757 HintCode.UNDEFINED_SETTER, | |
2758 HintCode.UNNECESSARY_CAST, | |
2759 HintCode.UNNECESSARY_TYPE_CHECK_FALSE, | |
2760 HintCode.UNNECESSARY_TYPE_CHECK_TRUE, | |
2761 HintCode.UNUSED_ELEMENT, | |
2762 HintCode.UNUSED_FIELD, | |
2763 HintCode.UNUSED_IMPORT, | |
2764 HintCode.UNUSED_CATCH_CLAUSE, | |
2765 HintCode.UNUSED_CATCH_STACK, | |
2766 HintCode.UNUSED_LOCAL_VARIABLE, | |
2767 HintCode.USE_OF_VOID_RESULT, | |
2768 HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE, | |
2769 HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE, | |
2770 HintCode.NULL_AWARE_IN_CONDITION, | |
2771 HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT, | |
2772 HtmlErrorCode.PARSE_ERROR, | |
2773 HtmlWarningCode.INVALID_URI, | |
2774 HtmlWarningCode.URI_DOES_NOT_EXIST, | |
2775 StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS, | |
2776 StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS, | |
2777 StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE, | |
2778 StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE, | |
2779 StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE, | |
2780 StaticTypeWarningCode.INACCESSIBLE_SETTER, | |
2781 StaticTypeWarningCode.INCONSISTENT_METHOD_INHERITANCE, | |
2782 StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER, | |
2783 StaticTypeWarningCode.INVALID_ASSIGNMENT, | |
2784 StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION, | |
2785 StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION, | |
2786 StaticTypeWarningCode.NON_BOOL_CONDITION, | |
2787 StaticTypeWarningCode.NON_BOOL_EXPRESSION, | |
2788 StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION, | |
2789 StaticTypeWarningCode.NON_BOOL_OPERAND, | |
2790 StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT, | |
2791 StaticTypeWarningCode.RETURN_OF_INVALID_TYPE, | |
2792 StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS, | |
2793 StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND, | |
2794 StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT, | |
2795 StaticTypeWarningCode.UNDEFINED_FUNCTION, | |
2796 StaticTypeWarningCode.UNDEFINED_GETTER, | |
2797 StaticTypeWarningCode.UNDEFINED_METHOD, | |
2798 StaticTypeWarningCode.UNDEFINED_OPERATOR, | |
2799 StaticTypeWarningCode.UNDEFINED_SETTER, | |
2800 StaticTypeWarningCode.UNDEFINED_SUPER_GETTER, | |
2801 StaticTypeWarningCode.UNDEFINED_SUPER_METHOD, | |
2802 StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR, | |
2803 StaticTypeWarningCode.UNDEFINED_SUPER_SETTER, | |
2804 StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER, | |
2805 StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS, | |
2806 StaticTypeWarningCode.YIELD_OF_INVALID_TYPE, | |
2807 StaticWarningCode.AMBIGUOUS_IMPORT, | |
2808 StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, | |
2809 StaticWarningCode.ASSIGNMENT_TO_CONST, | |
2810 StaticWarningCode.ASSIGNMENT_TO_FINAL, | |
2811 StaticWarningCode.ASSIGNMENT_TO_FINAL_NO_SETTER, | |
2812 StaticWarningCode.ASSIGNMENT_TO_FUNCTION, | |
2813 StaticWarningCode.ASSIGNMENT_TO_METHOD, | |
2814 StaticWarningCode.ASSIGNMENT_TO_TYPE, | |
2815 StaticWarningCode.CASE_BLOCK_NOT_TERMINATED, | |
2816 StaticWarningCode.CAST_TO_NON_TYPE, | |
2817 StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER, | |
2818 StaticWarningCode.CONFLICTING_DART_IMPORT, | |
2819 StaticWarningCode.CONFLICTING_INSTANCE_GETTER_AND_SUPERCLASS_MEMBER, | |
2820 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER, | |
2821 StaticWarningCode.CONFLICTING_INSTANCE_METHOD_SETTER2, | |
2822 StaticWarningCode.CONFLICTING_INSTANCE_SETTER_AND_SUPERCLASS_MEMBER, | |
2823 StaticWarningCode.CONFLICTING_STATIC_GETTER_AND_INSTANCE_SETTER, | |
2824 StaticWarningCode.CONFLICTING_STATIC_SETTER_AND_INSTANCE_MEMBER, | |
2825 StaticWarningCode.CONST_WITH_ABSTRACT_CLASS, | |
2826 StaticWarningCode.EQUAL_KEYS_IN_MAP, | |
2827 StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED, | |
2828 StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS, | |
2829 StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION, | |
2830 StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR, | |
2831 StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE, | |
2832 StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE, | |
2833 StaticWarningCode.FINAL_NOT_INITIALIZED, | |
2834 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1, | |
2835 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2, | |
2836 StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS, | |
2837 StaticWarningCode.FUNCTION_WITHOUT_CALL, | |
2838 StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED, | |
2839 StaticWarningCode.IMPORT_OF_NON_LIBRARY, | |
2840 StaticWarningCode.INCONSISTENT_METHOD_INHERITANCE_GETTER_AND_METHOD, | |
2841 StaticWarningCode.INSTANCE_METHOD_NAME_COLLIDES_WITH_SUPERCLASS_STATIC, | |
2842 StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE, | |
2843 StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE, | |
2844 StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE, | |
2845 StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE, | |
2846 StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE, | |
2847 StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED, | |
2848 StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL, | |
2849 StaticWarningCode.INVALID_OVERRIDE_NAMED, | |
2850 StaticWarningCode.INVALID_OVERRIDE_POSITIONAL, | |
2851 StaticWarningCode.INVALID_OVERRIDE_REQUIRED, | |
2852 StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE, | |
2853 StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE, | |
2854 StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE, | |
2855 StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE, | |
2856 StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES, | |
2857 StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES_FROM_SUPERTYPE, | |
2858 StaticWarningCode.MIXED_RETURN_TYPES, | |
2859 StaticWarningCode.NEW_WITH_ABSTRACT_CLASS, | |
2860 StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS, | |
2861 StaticWarningCode.NEW_WITH_NON_TYPE, | |
2862 StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR, | |
2863 StaticWarningCode.NEW_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT, | |
2864 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS, | |
2865 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FOUR, | |
2866 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_ONE, | |
2867 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_THREE, | |
2868 StaticWarningCode.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_TWO, | |
2869 StaticWarningCode.NON_TYPE_IN_CATCH_CLAUSE, | |
2870 StaticWarningCode.NON_VOID_RETURN_FOR_OPERATOR, | |
2871 StaticWarningCode.NON_VOID_RETURN_FOR_SETTER, | |
2872 StaticWarningCode.NOT_A_TYPE, | |
2873 StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS, | |
2874 StaticWarningCode.PART_OF_DIFFERENT_LIBRARY, | |
2875 StaticWarningCode.REDIRECT_TO_INVALID_FUNCTION_TYPE, | |
2876 StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE, | |
2877 StaticWarningCode.REDIRECT_TO_MISSING_CONSTRUCTOR, | |
2878 StaticWarningCode.REDIRECT_TO_NON_CLASS, | |
2879 StaticWarningCode.RETURN_WITHOUT_VALUE, | |
2880 StaticWarningCode.STATIC_ACCESS_TO_INSTANCE_MEMBER, | |
2881 StaticWarningCode.SWITCH_EXPRESSION_NOT_ASSIGNABLE, | |
2882 StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS, | |
2883 StaticWarningCode.TYPE_TEST_WITH_NON_TYPE, | |
2884 StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME, | |
2885 StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC, | |
2886 StaticWarningCode.UNDEFINED_CLASS, | |
2887 StaticWarningCode.UNDEFINED_CLASS_BOOLEAN, | |
2888 StaticWarningCode.UNDEFINED_GETTER, | |
2889 StaticWarningCode.UNDEFINED_IDENTIFIER, | |
2890 StaticWarningCode.UNDEFINED_NAMED_PARAMETER, | |
2891 StaticWarningCode.UNDEFINED_SETTER, | |
2892 StaticWarningCode.UNDEFINED_STATIC_METHOD_OR_GETTER, | |
2893 StaticWarningCode.UNDEFINED_SUPER_GETTER, | |
2894 StaticWarningCode.UNDEFINED_SUPER_SETTER, | |
2895 StaticWarningCode.VOID_RETURN_FOR_GETTER, | |
2896 TodoCode.TODO | |
2897 ]; | |
2898 | |
2899 /** | |
2508 * An empty list of error codes. | 2900 * An empty list of error codes. |
2509 */ | 2901 */ |
2510 static const List<ErrorCode> EMPTY_LIST = const <ErrorCode>[]; | 2902 static const List<ErrorCode> EMPTY_LIST = const <ErrorCode>[]; |
2511 | 2903 |
2512 /** | 2904 /** |
2513 * The name of the error code. | 2905 * The name of the error code. |
2514 */ | 2906 */ |
2515 final String name; | 2907 final String name; |
2516 | 2908 |
2517 /** | 2909 /** |
(...skipping 2579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5097 * Initialize a newly created error code to have the given [name]. | 5489 * Initialize a newly created error code to have the given [name]. |
5098 */ | 5490 */ |
5099 const TodoCode(String name) : super(name, "{0}"); | 5491 const TodoCode(String name) : super(name, "{0}"); |
5100 | 5492 |
5101 @override | 5493 @override |
5102 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 5494 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
5103 | 5495 |
5104 @override | 5496 @override |
5105 ErrorType get type => ErrorType.TODO; | 5497 ErrorType get type => ErrorType.TODO; |
5106 } | 5498 } |
OLD | NEW |