diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart index 23aceaef5c1..5f802a94f17 100644 --- a/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart +++ b/pkg/analyzer/lib/src/dart/error/hint_codes.g.dart @@ -188,6 +188,7 @@ class HintCode extends AnalyzerErrorCode { correctionMessage: "Try removing the case clause, or restructuring the preceding " "patterns.", + hasPublishedDocs: true, ); /// Parameters: diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart index edddfc47229..dde5ba5f8e1 100644 --- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart +++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart @@ -193,6 +193,7 @@ class ParserErrorCode extends ErrorCode { 'ABSTRACT_SEALED_CLASS', "A class can't be declared both 'sealed' and 'abstract'.", correctionMessage: "Try removing the 'abstract' or 'sealed' keyword.", + hasPublishedDocs: true, ); static const ParserErrorCode ABSTRACT_STATIC_FIELD = ParserErrorCode( @@ -468,6 +469,7 @@ class ParserErrorCode extends ErrorCode { 'EMPTY_RECORD_LITERAL_WITH_COMMA', "A record literal without fields can't have a trailing comma.", correctionMessage: "Try removing the trailing comma.", + hasPublishedDocs: true, ); static const ParserErrorCode EMPTY_RECORD_TYPE_NAMED_FIELDS_LIST = @@ -475,12 +477,14 @@ class ParserErrorCode extends ErrorCode { 'EMPTY_RECORD_TYPE_NAMED_FIELDS_LIST', "The list of named fields in a record type can't be empty.", correctionMessage: "Try adding a named field to the list.", + hasPublishedDocs: true, ); static const ParserErrorCode EMPTY_RECORD_TYPE_WITH_COMMA = ParserErrorCode( 'EMPTY_RECORD_TYPE_WITH_COMMA', "A record type without fields can't have a trailing comma.", correctionMessage: "Try removing the trailing comma.", + hasPublishedDocs: true, ); static const ParserErrorCode ENUM_IN_CLASS = ParserErrorCode( @@ -1545,6 +1549,7 @@ class ParserErrorCode extends ErrorCode { "A record literal with exactly one positional field requires a trailing " "comma.", correctionMessage: "Try adding a trailing comma.", + hasPublishedDocs: true, ); static const ParserErrorCode RECORD_TYPE_ONE_POSITIONAL_NO_TRAILING_COMMA = @@ -1553,6 +1558,7 @@ class ParserErrorCode extends ErrorCode { "A record type with exactly one positional field requires a trailing " "comma.", correctionMessage: "Try adding a trailing comma.", + hasPublishedDocs: true, ); static const ParserErrorCode REDIRECTING_CONSTRUCTOR_WITH_BODY = diff --git a/pkg/analyzer/lib/src/error/codes.g.dart b/pkg/analyzer/lib/src/error/codes.g.dart index 3f62ac27201..babbd62716e 100644 --- a/pkg/analyzer/lib/src/error/codes.g.dart +++ b/pkg/analyzer/lib/src/error/codes.g.dart @@ -235,6 +235,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The class '{0}' can't be implemented outside of its library because it's " "a base class.", + hasPublishedDocs: true, uniqueName: 'BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY', ); @@ -245,6 +246,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The mixin '{0}' can't be implemented outside of its library because it's " "a base mixin.", + hasPublishedDocs: true, uniqueName: 'BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY', ); @@ -417,6 +419,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'CLASS_USED_AS_MIXIN', "The class '{0}' can't be used as a mixin because it's neither a mixin " "class nor a mixin.", + hasPublishedDocs: true, ); static const CompileTimeErrorCode CONCRETE_CLASS_HAS_ENUM_SUPERINTERFACE = @@ -655,6 +658,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'CONSTANT_PATTERN_WITH_NON_CONSTANT_EXPRESSION', "The expression of a constant pattern must be a valid constant.", correctionMessage: "Try making the expression a valid constant.", + hasPublishedDocs: true, ); /// 16.12.2 Const: It is a compile-time error if evaluation of a constant @@ -1184,6 +1188,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'DUPLICATE_FIELD_NAME', "The field name '{0}' is already used in this record.", correctionMessage: "Try renaming the field.", + hasPublishedDocs: true, ); /// Parameters: @@ -1215,6 +1220,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'DUPLICATE_PATTERN_ASSIGNMENT_VARIABLE', "The variable '{0}' is already assigned in this pattern.", correctionMessage: "Try renaming the variable.", + hasPublishedDocs: true, ); /// Parameters: @@ -1224,13 +1230,16 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'DUPLICATE_PATTERN_FIELD', "The field '{0}' is already matched in this pattern.", correctionMessage: "Try removing the duplicate field.", + hasPublishedDocs: true, ); + /// No parameters. static const CompileTimeErrorCode DUPLICATE_REST_ELEMENT_IN_PATTERN = CompileTimeErrorCode( 'DUPLICATE_REST_ELEMENT_IN_PATTERN', "At most one rest element is allowed in a list or map pattern.", correctionMessage: "Try removing the duplicate rest element.", + hasPublishedDocs: true, ); /// Parameters: @@ -1240,6 +1249,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'DUPLICATE_VARIABLE_PATTERN', "The variable '{0}' is already defined in this pattern.", correctionMessage: "Try renaming the variable.", + hasPublishedDocs: true, ); static const CompileTimeErrorCode ENUM_CONSTANT_SAME_NAME_AS_ENCLOSING = @@ -1316,6 +1326,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'EQUAL_KEYS_IN_MAP_PATTERN', "Two keys in a map pattern can't be equal.", correctionMessage: "Change or remove the duplicate key.", + hasPublishedDocs: true, ); /// Parameters: @@ -1325,6 +1336,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'EXPECTED_ONE_LIST_PATTERN_TYPE_ARGUMENTS', "List patterns require one type argument or none, but {0} found.", correctionMessage: "Try adjusting the number of type arguments.", + hasPublishedDocs: true, ); /// Parameters: @@ -1354,6 +1366,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'EXPECTED_TWO_MAP_PATTERN_TYPE_ARGUMENTS', "Map patterns require two type arguments or none, but {0} found.", correctionMessage: "Try adjusting the number of type arguments.", + hasPublishedDocs: true, ); /// Parameters: @@ -1669,6 +1682,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The class '{0}' can't be extended outside of its library because it's a " "final class.", + hasPublishedDocs: true, uniqueName: 'FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY', ); @@ -1679,6 +1693,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The class '{0}' can't be implemented outside of its library because it's " "a final class.", + hasPublishedDocs: true, uniqueName: 'FINAL_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY', ); @@ -1700,6 +1715,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The mixin '{0}' can't be implemented outside of its library because it's " "a final mixin.", + hasPublishedDocs: true, uniqueName: 'FINAL_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY', ); @@ -1710,6 +1726,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The mixin '{0}' can't be mixed-in outside of its library because it's a " "final mixin.", + hasPublishedDocs: true, uniqueName: 'FINAL_MIXIN_MIXED_IN_OUTSIDE_OF_LIBRARY', ); @@ -2137,6 +2154,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try declaring the variable pattern with the same type and finality in " "both branches.", + hasPublishedDocs: true, ); /// Parameters: @@ -2281,6 +2299,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The class '{0}' can't be extended outside of its library because it's an " "interface class.", + hasPublishedDocs: true, uniqueName: 'INTERFACE_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY', ); @@ -2291,6 +2310,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The mixin '{0}' can't be mixed-in outside of its library because it's an " "interface mixin.", + hasPublishedDocs: true, uniqueName: 'INTERFACE_MIXIN_MIXED_IN_OUTSIDE_OF_LIBRARY', ); @@ -2472,6 +2492,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_FIELD_NAME', "Record field names can't be the same as a member from 'Object'.", correctionMessage: "Try using a different name for the field.", + hasPublishedDocs: true, uniqueName: 'INVALID_FIELD_NAME_FROM_OBJECT', ); @@ -2482,6 +2503,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { "Record field names can't be a dollar sign followed by an integer when the " "integer is the index of a positional field.", correctionMessage: "Try using a different name for the field.", + hasPublishedDocs: true, uniqueName: 'INVALID_FIELD_NAME_POSITIONAL', ); @@ -2491,6 +2513,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_FIELD_NAME', "Record field names can't be private.", correctionMessage: "Try removing the leading underscore.", + hasPublishedDocs: true, uniqueName: 'INVALID_FIELD_NAME_PRIVATE', ); @@ -2916,6 +2939,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { uniqueName: 'MISSING_DEFAULT_VALUE_FOR_PARAMETER_WITH_ANNOTATION', ); + /// No parameters. static const CompileTimeErrorCode MISSING_OBJECT_PATTERN_GETTER_NAME = CompileTimeErrorCode( 'MISSING_OBJECT_PATTERN_GETTER_NAME', @@ -2924,6 +2948,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try specifying the getter name explicitly, or using a variable " "pattern.", + hasPublishedDocs: true, ); /// Parameters: @@ -2945,6 +2970,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { "Variable pattern '{0}' is missing in this branch of the logical-or " "pattern.", correctionMessage: "Try declaring this variable pattern in the branch.", + hasPublishedDocs: true, ); /// Parameters: @@ -3013,6 +3039,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try removing the 'mixin' modifier or changing the superclass to " "'Object'.", + hasPublishedDocs: true, ); /// Parameters: @@ -3404,6 +3431,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'NON_CONSTANT_MAP_PATTERN_KEY', "Key expressions in map patterns must be constants.", correctionMessage: "Try using constants instead.", + hasPublishedDocs: true, ); /// No parameters. @@ -3434,6 +3462,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'NON_CONSTANT_RELATIONAL_PATTERN_EXPRESSION', "The relational pattern expression must be a constant.", correctionMessage: "Try using a constant instead.", + hasPublishedDocs: true, ); /// No parameters. @@ -3471,6 +3500,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'NON_EXHAUSTIVE_SWITCH', "The type '{0}' is not exhaustively matched by the switch cases.", correctionMessage: "Try adding a default case or cases that match '{1}'.", + hasPublishedDocs: true, ); /// No parameters. @@ -3882,6 +3912,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'PATTERN_ASSIGNMENT_NOT_LOCAL_VARIABLE', "Only local variables can be assigned in pattern assignments.", correctionMessage: "Try assigning to a local variable.", + hasPublishedDocs: true, ); /// No parameters. @@ -3890,6 +3921,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'PATTERN_CONSTANT_FROM_DEFERRED_LIBRARY', "Constant values from a deferred library can't be used in patterns.", correctionMessage: "Try removing the keyword 'deferred' from the import.", + hasPublishedDocs: true, ); /// Parameters: @@ -3903,14 +3935,17 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try changing the required type of the pattern, or the matched value " "type.", + hasPublishedDocs: true, ); + /// No parameters. static const CompileTimeErrorCode PATTERN_VARIABLE_ASSIGNMENT_INSIDE_GUARD = CompileTimeErrorCode( 'PATTERN_VARIABLE_ASSIGNMENT_INSIDE_GUARD', "Pattern variables can't be assigned inside the guard of the enclosing " "guarded pattern.", correctionMessage: "Try assigning to a different variable.", + hasPublishedDocs: true, ); /// Parameters: @@ -3924,6 +3959,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try declaring the variable pattern with the same type and finality in " "all cases.", + hasPublishedDocs: true, uniqueName: 'PATTERN_VARIABLE_SHARED_CASE_SCOPE_DIFFERENT_FINALITY_OR_TYPE', ); @@ -3937,6 +3973,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try removing the label, or providing the 'default' case with its own " "body.", + hasPublishedDocs: true, uniqueName: 'PATTERN_VARIABLE_SHARED_CASE_SCOPE_HAS_LABEL', ); @@ -3950,6 +3987,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try declaring the variable pattern with the same type and finality in " "all cases.", + hasPublishedDocs: true, uniqueName: 'PATTERN_VARIABLE_SHARED_CASE_SCOPE_NOT_ALL_CASES', ); @@ -4271,6 +4309,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { hasPublishedDocs: true, ); + /// No parameters. static const CompileTimeErrorCode REFUTABLE_PATTERN_IN_IRREFUTABLE_CONTEXT = CompileTimeErrorCode( 'REFUTABLE_PATTERN_IN_IRREFUTABLE_CONTEXT', @@ -4278,6 +4317,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { correctionMessage: "Try using an if-case, a 'switch' statement, or a 'switch' expression " "instead.", + hasPublishedDocs: true, ); /// Parameters: @@ -4289,8 +4329,10 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'RELATIONAL_PATTERN_OPERAND_TYPE_NOT_ASSIGNABLE', "The constant expression type '{0}' is not assignable to the parameter " "type '{1}' of the '{2}' operator.", + hasPublishedDocs: true, ); + /// No parameters. static const CompileTimeErrorCode RELATIONAL_PATTERN_OPERATOR_RETURN_TYPE_NOT_ASSIGNABLE_TO_BOOL = CompileTimeErrorCode( @@ -4299,20 +4341,25 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { "assignable to 'bool'.", correctionMessage: "Try updating the operator declaration to return 'bool'.", + hasPublishedDocs: true, ); + /// No parameters. static const CompileTimeErrorCode REST_ELEMENT_NOT_LAST_IN_MAP_PATTERN = CompileTimeErrorCode( 'REST_ELEMENT_NOT_LAST_IN_MAP_PATTERN', "A rest element in a map pattern must be the last element.", correctionMessage: "Try moving the rest element to be the last element.", + hasPublishedDocs: true, ); + /// No parameters. static const CompileTimeErrorCode REST_ELEMENT_WITH_SUBPATTERN_IN_MAP_PATTERN = CompileTimeErrorCode( 'REST_ELEMENT_WITH_SUBPATTERN_IN_MAP_PATTERN', "A rest element in a map pattern can't have a subpattern.", correctionMessage: "Try removing the subpattern.", + hasPublishedDocs: true, ); /// No parameters. @@ -4411,6 +4458,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The class '{0}' can't be extended, implemented, or mixed in outside of " "its library because it's a sealed class.", + hasPublishedDocs: true, uniqueName: 'SEALED_CLASS_SUBTYPE_OUTSIDE_OF_LIBRARY', ); @@ -4421,6 +4469,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY', "The mixin '{0}' can't be mixed in outside of its library because it's a " "sealed mixin.", + hasPublishedDocs: true, uniqueName: 'SEALED_MIXIN_SUBTYPE_OUTSIDE_OF_LIBRARY', ); @@ -4481,6 +4530,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED', "The type '{0}' must be 'base', 'final' or 'sealed' because the supertype " "'{1}' is 'base'.", + hasPublishedDocs: true, uniqueName: 'SUBTYPE_OF_BASE_IS_NOT_BASE_FINAL_OR_SEALED', ); @@ -4492,6 +4542,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { 'SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED', "The type '{0}' must be 'base', 'final' or 'sealed' because the supertype " "'{1}' is 'final'.", + hasPublishedDocs: true, uniqueName: 'SUBTYPE_OF_FINAL_IS_NOT_BASE_FINAL_OR_SEALED', ); @@ -5261,6 +5312,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode { "Variable patterns in declaration context can't specify 'var' or 'final' " "keyword.", correctionMessage: "Try removing the keyword.", + hasPublishedDocs: true, ); /// Parameters: @@ -5720,6 +5772,7 @@ class StaticWarningCode extends AnalyzerErrorCode { "isn't nullable.", correctionMessage: "Try replacing the null-assert pattern with its nested pattern.", + hasPublishedDocs: true, ); /// No parameters. @@ -5730,6 +5783,7 @@ class StaticWarningCode extends AnalyzerErrorCode { "nullable.", correctionMessage: "Try replacing the null-check pattern with its nested pattern.", + hasPublishedDocs: true, ); /// Initialize a newly created error code to have the given [name]. @@ -5797,6 +5851,7 @@ class WarningCode extends AnalyzerErrorCode { correctionMessage: "Try adding a return statement, or if no value is ever returned, try " "changing the return type to 'void'.", + hasPublishedDocs: true, ); /// Parameters: @@ -5829,6 +5884,7 @@ class WarningCode extends AnalyzerErrorCode { "'{1}'.", correctionMessage: "Try a constant of the same type as the matched value type.", + hasPublishedDocs: true, ); /// Dead code is code that is never reached, this can happen for instance if a @@ -6669,6 +6725,7 @@ class WarningCode extends AnalyzerErrorCode { "A record literal with exactly one positional field requires a trailing " "comma.", correctionMessage: "Try adding a trailing comma.", + hasPublishedDocs: true, ); /// An error code indicating use of a removed lint rule. @@ -6980,6 +7037,7 @@ class WarningCode extends AnalyzerErrorCode { 'UNNECESSARY_NAN_COMPARISON', "A double can't equal 'double.nan', so the condition is always 'false'.", correctionMessage: "Try using 'double.isNan', or removing the condition.", + hasPublishedDocs: true, uniqueName: 'UNNECESSARY_NAN_COMPARISON_FALSE', ); @@ -6988,6 +7046,7 @@ class WarningCode extends AnalyzerErrorCode { 'UNNECESSARY_NAN_COMPARISON', "A double can't equal 'double.nan', so the condition is always 'true'.", correctionMessage: "Try using 'double.isNan', or removing the condition.", + hasPublishedDocs: true, uniqueName: 'UNNECESSARY_NAN_COMPARISON_TRUE', ); @@ -7032,6 +7091,7 @@ class WarningCode extends AnalyzerErrorCode { 'UNNECESSARY_SET_LITERAL', "Braces unnecessarily wrap this expression in a set literal.", correctionMessage: "Try removing the set literal around the expression.", + hasPublishedDocs: true, ); /// No parameters. diff --git a/pkg/analyzer/messages.yaml b/pkg/analyzer/messages.yaml index 83aa37e5216..0d57d438364 100644 --- a/pkg/analyzer/messages.yaml +++ b/pkg/analyzer/messages.yaml @@ -1130,6 +1130,7 @@ CompileTimeErrorCode: BASE_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The class '{0}' can't be implemented outside of its library because it's a base class." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the base class being implemented @@ -1182,6 +1183,7 @@ CompileTimeErrorCode: BASE_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The mixin '{0}' can't be implemented outside of its library because it's a base mixin." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the base mixin being implemented @@ -1648,6 +1650,7 @@ CompileTimeErrorCode: comment: |- Parameters: 0: the name of the class being used as a mixin + hasPublishedDocs: true documentation: |- #### Description @@ -1807,6 +1810,7 @@ CompileTimeErrorCode: PATTERN_CONSTANT_FROM_DEFERRED_LIBRARY: problemMessage: Constant values from a deferred library can't be used in patterns. correctionMessage: Try removing the keyword 'deferred' from the import. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -3132,6 +3136,7 @@ CompileTimeErrorCode: problemMessage: The expression of a constant pattern must be a valid constant. correctionMessage: Try making the expression a valid constant. comment: No parameters. + hasPublishedDocs: true documentation: |- #### Description @@ -3682,6 +3687,7 @@ CompileTimeErrorCode: DUPLICATE_FIELD_NAME: problemMessage: The field name '{0}' is already used in this record. correctionMessage: Try renaming the field. + hasPublishedDocs: true comment: |- Parameters: 0: the duplicated name @@ -3855,6 +3861,7 @@ CompileTimeErrorCode: DUPLICATE_PATTERN_ASSIGNMENT_VARIABLE: problemMessage: The variable '{0}' is already assigned in this pattern. correctionMessage: Try renaming the variable. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the variable @@ -3903,6 +3910,7 @@ CompileTimeErrorCode: DUPLICATE_PATTERN_FIELD: problemMessage: The field '{0}' is already matched in this pattern. correctionMessage: Try removing the duplicate field. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the field @@ -3970,6 +3978,8 @@ CompileTimeErrorCode: DUPLICATE_REST_ELEMENT_IN_PATTERN: problemMessage: At most one rest element is allowed in a list or map pattern. correctionMessage: Try removing the duplicate rest element. + hasPublishedDocs: true + comment: No parameters. documentation: |- #### Description @@ -4001,6 +4011,7 @@ CompileTimeErrorCode: DUPLICATE_VARIABLE_PATTERN: problemMessage: The variable '{0}' is already defined in this pattern. correctionMessage: Try renaming the variable. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the variable @@ -4314,6 +4325,7 @@ CompileTimeErrorCode: EQUAL_KEYS_IN_MAP_PATTERN: problemMessage: Two keys in a map pattern can't be equal. correctionMessage: Change or remove the duplicate key. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -4354,6 +4366,7 @@ CompileTimeErrorCode: EXPECTED_ONE_LIST_PATTERN_TYPE_ARGUMENTS: problemMessage: List patterns require one type argument or none, but {0} found. correctionMessage: Try adjusting the number of type arguments. + hasPublishedDocs: true comment: |- Parameters: 0: the number of provided type arguments @@ -4474,6 +4487,7 @@ CompileTimeErrorCode: EXPECTED_TWO_MAP_PATTERN_TYPE_ARGUMENTS: problemMessage: Map patterns require two type arguments or none, but {0} found. correctionMessage: Try adjusting the number of type arguments. + hasPublishedDocs: true comment: |- Parameters: 0: the number of provided type arguments @@ -5547,12 +5561,14 @@ CompileTimeErrorCode: FINAL_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The class '{0}' can't be extended outside of its library because it's a final class." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the final class being extended. FINAL_CLASS_IMPLEMENTED_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The class '{0}' can't be implemented outside of its library because it's a final class." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the final class being implemented. @@ -5608,12 +5624,14 @@ CompileTimeErrorCode: FINAL_MIXIN_IMPLEMENTED_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The mixin '{0}' can't be implemented outside of its library because it's a final mixin." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the final mixin being implemented. FINAL_MIXIN_MIXED_IN_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The mixin '{0}' can't be mixed-in outside of its library because it's a final mixin." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the final mixin being mixed in. @@ -6728,6 +6746,7 @@ CompileTimeErrorCode: INCONSISTENT_PATTERN_VARIABLE_LOGICAL_OR: problemMessage: "The variable '{0}' has a different type and/or finality in this branch of the logical-or pattern." correctionMessage: Try declaring the variable pattern with the same type and finality in both branches. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the pattern variable @@ -7332,12 +7351,14 @@ CompileTimeErrorCode: INTERFACE_CLASS_EXTENDED_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The class '{0}' can't be extended outside of its library because it's an interface class." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the interface class being extended. INTERFACE_MIXIN_MIXED_IN_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The mixin '{0}' can't be mixed-in outside of its library because it's an interface mixin." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the interface mixin being mixed in. @@ -7760,6 +7781,7 @@ CompileTimeErrorCode: sharedName: INVALID_FIELD_NAME problemMessage: Record field names can't be the same as a member from 'Object'. correctionMessage: Try using a different name for the field. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -7830,11 +7852,13 @@ CompileTimeErrorCode: sharedName: INVALID_FIELD_NAME problemMessage: Record field names can't be private. correctionMessage: Try removing the leading underscore. + hasPublishedDocs: true comment: No parameters. INVALID_FIELD_NAME_POSITIONAL: sharedName: INVALID_FIELD_NAME problemMessage: Record field names can't be a dollar sign followed by an integer when the integer is the index of a positional field. correctionMessage: Try using a different name for the field. + hasPublishedDocs: true comment: No parameters. INVALID_IMPLEMENTATION_OVERRIDE: problemMessage: "'{1}.{0}' ('{2}') isn't a valid concrete implementation of '{3}.{0}' ('{4}')." @@ -9198,6 +9222,8 @@ CompileTimeErrorCode: MISSING_OBJECT_PATTERN_GETTER_NAME: problemMessage: The getter name is not specified explicitly, and the pattern is not a variable. correctionMessage: Try specifying the getter name explicitly, or using a variable pattern. + hasPublishedDocs: true + comment: No parameters. documentation: |- #### Description @@ -9299,6 +9325,7 @@ CompileTimeErrorCode: MISSING_VARIABLE_PATTERN: problemMessage: "Variable pattern '{0}' is missing in this branch of the logical-or pattern." correctionMessage: "Try declaring this variable pattern in the branch." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the variable pattern @@ -9600,6 +9627,7 @@ CompileTimeErrorCode: MIXIN_CLASS_DECLARATION_EXTENDS_NOT_OBJECT: problemMessage: "The class '{0}' can't be declared a mixin because it extends a class other than 'Object'." correctionMessage: Try removing the 'mixin' modifier or changing the superclass to 'Object'. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the mixin class that is invalid @@ -10719,6 +10747,7 @@ CompileTimeErrorCode: NON_CONSTANT_MAP_PATTERN_KEY: problemMessage: Key expressions in map patterns must be constants. correctionMessage: Try using constants instead. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -10793,6 +10822,7 @@ CompileTimeErrorCode: NON_CONSTANT_RELATIONAL_PATTERN_EXPRESSION: problemMessage: The relational pattern expression must be a constant. correctionMessage: Try using a constant instead. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -10871,6 +10901,7 @@ CompileTimeErrorCode: NON_EXHAUSTIVE_SWITCH: problemMessage: "The type '{0}' is not exhaustively matched by the switch cases." correctionMessage: "Try adding a default case or cases that match '{1}'." + hasPublishedDocs: true comment: |- Parameters: 0: the type of the switch scrutinee @@ -12307,6 +12338,7 @@ CompileTimeErrorCode: PATTERN_ASSIGNMENT_NOT_LOCAL_VARIABLE: problemMessage: Only local variables can be assigned in pattern assignments. correctionMessage: Try assigning to a local variable. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -12363,6 +12395,7 @@ CompileTimeErrorCode: PATTERN_TYPE_MISMATCH_IN_IRREFUTABLE_CONTEXT: problemMessage: "The matched value of type '{0}' isn't assignable to the required type '{1}'." correctionMessage: "Try changing the required type of the pattern, or the matched value type." + hasPublishedDocs: true comment: |- Parameters: 0: the matched type @@ -12400,6 +12433,8 @@ CompileTimeErrorCode: PATTERN_VARIABLE_ASSIGNMENT_INSIDE_GUARD: problemMessage: Pattern variables can't be assigned inside the guard of the enclosing guarded pattern. correctionMessage: Try assigning to a different variable. + hasPublishedDocs: true + comment: No parameters. documentation: |- #### Description @@ -12446,6 +12481,7 @@ CompileTimeErrorCode: sharedName: INVALID_PATTERN_VARIABLE_IN_SHARED_CASE_SCOPE problemMessage: "The variable '{0}' doesn't have the same type and/or finality in all cases that share this body." correctionMessage: Try declaring the variable pattern with the same type and finality in all cases. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the pattern variable @@ -12599,6 +12635,7 @@ CompileTimeErrorCode: sharedName: INVALID_PATTERN_VARIABLE_IN_SHARED_CASE_SCOPE problemMessage: "The variable '{0}' is not available because there is a label or 'default' case." correctionMessage: Try removing the label, or providing the 'default' case with its own body. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the pattern variable @@ -12606,6 +12643,7 @@ CompileTimeErrorCode: sharedName: INVALID_PATTERN_VARIABLE_IN_SHARED_CASE_SCOPE problemMessage: "The variable '{0}' is available in some, but not all cases that share this body." correctionMessage: Try declaring the variable pattern with the same type and finality in all cases. + hasPublishedDocs: true comment: |- Parameters: 0: the name of the pattern variable @@ -13708,6 +13746,8 @@ CompileTimeErrorCode: REFUTABLE_PATTERN_IN_IRREFUTABLE_CONTEXT: problemMessage: Refutable patterns can't be used in an irrefutable context. correctionMessage: Try using an if-case, a 'switch' statement, or a 'switch' expression instead. + hasPublishedDocs: true + comment: No parameters. documentation: |- #### Description @@ -13742,6 +13782,7 @@ CompileTimeErrorCode: Rewrite the code to not use a refutable pattern in an irrefutable context. RELATIONAL_PATTERN_OPERAND_TYPE_NOT_ASSIGNABLE: problemMessage: "The constant expression type '{0}' is not assignable to the parameter type '{1}' of the '{2}' operator." + hasPublishedDocs: true comment: |- Parameters: 0: the operand type @@ -13818,6 +13859,8 @@ CompileTimeErrorCode: RELATIONAL_PATTERN_OPERATOR_RETURN_TYPE_NOT_ASSIGNABLE_TO_BOOL: problemMessage: The return type of operators used in relational patterns must be assignable to 'bool'. correctionMessage: Try updating the operator declaration to return 'bool'. + hasPublishedDocs: true + comment: No parameters. documentation: |- #### Description @@ -13888,6 +13931,8 @@ CompileTimeErrorCode: REST_ELEMENT_WITH_SUBPATTERN_IN_MAP_PATTERN: problemMessage: A rest element in a map pattern can't have a subpattern. correctionMessage: Try removing the subpattern. + hasPublishedDocs: true + comment: No parameters. documentation: |- #### Description @@ -13924,6 +13969,8 @@ CompileTimeErrorCode: REST_ELEMENT_NOT_LAST_IN_MAP_PATTERN: problemMessage: A rest element in a map pattern must be the last element. correctionMessage: Try moving the rest element to be the last element. + hasPublishedDocs: true + comment: No parameters. documentation: |- #### Description @@ -14231,12 +14278,14 @@ CompileTimeErrorCode: SEALED_CLASS_SUBTYPE_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The class '{0}' can't be extended, implemented, or mixed in outside of its library because it's a sealed class." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the sealed class being extended, implemented, or mixed in SEALED_MIXIN_SUBTYPE_OUTSIDE_OF_LIBRARY: sharedName: INVALID_USE_OF_TYPE_OUTSIDE_LIBRARY problemMessage: "The mixin '{0}' can't be mixed in outside of its library because it's a sealed mixin." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the sealed mixin being mixed in @@ -14385,6 +14434,7 @@ CompileTimeErrorCode: SUBTYPE_OF_BASE_IS_NOT_BASE_FINAL_OR_SEALED: sharedName: SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED problemMessage: "The type '{0}' must be 'base', 'final' or 'sealed' because the supertype '{1}' is 'base'." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the subtype that is not 'base', 'final', or 'sealed' @@ -14418,6 +14468,7 @@ CompileTimeErrorCode: SUBTYPE_OF_FINAL_IS_NOT_BASE_FINAL_OR_SEALED: sharedName: SUBTYPE_OF_BASE_OR_FINAL_IS_NOT_BASE_FINAL_OR_SEALED problemMessage: "The type '{0}' must be 'base', 'final' or 'sealed' because the supertype '{1}' is 'final'." + hasPublishedDocs: true comment: |- Parameters: 0: the name of the subtype that is not 'base', 'final', or 'sealed' @@ -17040,6 +17091,7 @@ CompileTimeErrorCode: VARIABLE_PATTERN_KEYWORD_IN_DECLARATION_CONTEXT: problemMessage: Variable patterns in declaration context can't specify 'var' or 'final' keyword. correctionMessage: Try removing the keyword. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -19832,6 +19884,7 @@ HintCode: UNREACHABLE_SWITCH_CASE: problemMessage: "This case is covered by the previous cases." correctionMessage: Try removing the case clause, or restructuring the preceding patterns. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -21267,8 +21320,8 @@ StaticWarningCode: UNNECESSARY_NULL_ASSERT_PATTERN: problemMessage: The null-assert pattern will have no effect because the matched type isn't nullable. correctionMessage: Try replacing the null-assert pattern with its nested pattern. + hasPublishedDocs: true comment: No parameters. - documentation: |- #### Description @@ -21298,6 +21351,7 @@ StaticWarningCode: UNNECESSARY_NULL_CHECK_PATTERN: problemMessage: The null-check pattern will have no effect because the matched type isn't nullable. correctionMessage: Try replacing the null-check pattern with its nested pattern. + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -21472,7 +21526,7 @@ WarningCode: BODY_MIGHT_COMPLETE_NORMALLY_NULLABLE: problemMessage: "This function has a nullable return type of '{0}', but ends without returning a value." correctionMessage: "Try adding a return statement, or if no value is ever returned, try changing the return type to 'void'." - hasPublishedDocs: false + hasPublishedDocs: true comment: |- Parameters: 0: the name of the declared return type @@ -21594,6 +21648,7 @@ WarningCode: CONSTANT_PATTERN_NEVER_MATCHES_VALUE_TYPE: problemMessage: "The matched value type '{0}' can never be equal to this constant of type '{1}'." correctionMessage: "Try a constant of the same type as the matched value type." + hasPublishedDocs: true comment: |- Parameters: 0: the matched value type @@ -23806,6 +23861,7 @@ WarningCode: RECORD_LITERAL_ONE_POSITIONAL_NO_TRAILING_COMMA: problemMessage: "A record literal with exactly one positional field requires a trailing comma." correctionMessage: Try adding a trailing comma. + hasPublishedDocs: true REMOVED_LINT_USE: problemMessage: "'{0}' was removed in Dart '{1}'" correctionMessage: "Remove the reference to '{0}'." @@ -24854,7 +24910,7 @@ WarningCode: sharedName: UNNECESSARY_NAN_COMPARISON problemMessage: A double can't equal 'double.nan', so the condition is always 'false'. correctionMessage: Try using 'double.isNan', or removing the condition. - hasPublishedDocs: false + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description @@ -24891,7 +24947,7 @@ WarningCode: sharedName: UNNECESSARY_NAN_COMPARISON problemMessage: A double can't equal 'double.nan', so the condition is always 'true'. correctionMessage: Try using 'double.isNan', or removing the condition. - hasPublishedDocs: false + hasPublishedDocs: true comment: No parameters. UNNECESSARY_NO_SUCH_METHOD: problemMessage: "Unnecessary 'noSuchMethod' declaration." @@ -25038,7 +25094,7 @@ WarningCode: UNNECESSARY_SET_LITERAL: problemMessage: Braces unnecessarily wrap this expression in a set literal. correctionMessage: Try removing the set literal around the expression. - hasPublishedDocs: false + hasPublishedDocs: true comment: No parameters. documentation: |- #### Description diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml index e9efe7dd5bb..da5d6d563b8 100644 --- a/pkg/front_end/messages.yaml +++ b/pkg/front_end/messages.yaml @@ -350,6 +350,7 @@ RecordLiteralOnePositionalFieldNoTrailingComma: correctionMessage: "Try adding a trailing comma." analyzerCode: ParserErrorCode.RECORD_LITERAL_ONE_POSITIONAL_NO_TRAILING_COMMA index: 127 + hasPublishedDocs: true documentation: |- #### Description @@ -387,6 +388,7 @@ RecordLiteralZeroFieldsWithTrailingComma: correctionMessage: "Try removing the trailing comma." analyzerCode: ParserErrorCode.EMPTY_RECORD_LITERAL_WITH_COMMA index: 128 + hasPublishedDocs: true documentation: |- #### Description @@ -427,6 +429,7 @@ EmptyRecordTypeNamedFieldsList: correctionMessage: "Try adding a named field to the list." analyzerCode: ParserErrorCode.EMPTY_RECORD_TYPE_NAMED_FIELDS_LIST index: 129 + hasPublishedDocs: true documentation: |- #### Description @@ -468,6 +471,7 @@ RecordTypeZeroFieldsButTrailingComma: correctionMessage: "Try removing the trailing comma." analyzerCode: ParserErrorCode.EMPTY_RECORD_TYPE_WITH_COMMA index: 130 + hasPublishedDocs: true documentation: |- #### Description @@ -508,6 +512,7 @@ RecordTypeOnePositionalFieldNoTrailingComma: correctionMessage: "Try adding a trailing comma." analyzerCode: ParserErrorCode.RECORD_TYPE_ONE_POSITIONAL_NO_TRAILING_COMMA index: 131 + hasPublishedDocs: true documentation: |- #### Description @@ -955,6 +960,7 @@ AbstractSealedClass: correctionMessage: "Try removing the 'abstract' or 'sealed' keyword." analyzerCode: ParserErrorCode.ABSTRACT_SEALED_CLASS index: 132 + hasPublishedDocs: true documentation: |- #### Description