Skip to content

Commit 13fdaa0

Browse files
parloughCommit Queue
authored and
Commit Queue
committed
[analyzer] Mark new asset and extension type diagnostic docs as published
Closes dart-lang/site-www#5396 Bug: dart-lang/site-www#5396 Change-Id: Ic4ebe03fd7195a241608cffebfd91b11125c7fa2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340481 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Marya Belanger <[email protected]> Reviewed-by: Marya Belanger <[email protected]>
1 parent 3f299c9 commit 13fdaa0

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

pkg/analyzer/lib/src/error/codes.g.dart

+16
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
261261
correctionMessage:
262262
"Try removing the `await`, or updating the extension type to implement "
263263
"'Future'.",
264+
hasPublishedDocs: true,
264265
);
265266

266267
/// Parameters:
@@ -1668,6 +1669,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
16681669
'EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_FORMAL_PARAMETER',
16691670
"Extension type constructors can't declare super formal parameters.",
16701671
correctionMessage: "Try removing the super formal parameter declaration.",
1672+
hasPublishedDocs: true,
16711673
);
16721674

16731675
/// No parameters.
@@ -1676,6 +1678,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
16761678
'EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_INVOCATION',
16771679
"Extension type constructors can't include super initializers.",
16781680
correctionMessage: "Try removing the super constructor invocation.",
1681+
hasPublishedDocs: true,
16791682
);
16801683

16811684
/// No parameters.
@@ -1684,6 +1687,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
16841687
'EXTENSION_TYPE_DECLARES_INSTANCE_FIELD',
16851688
"Extension types can't declare instance fields.",
16861689
correctionMessage: "Try replacing the field with a getter.",
1690+
hasPublishedDocs: true,
16871691
);
16881692

16891693
/// No parameters.
@@ -1693,6 +1697,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
16931697
"Extension types can't declare members with the same name as a member "
16941698
"declared by 'Object'.",
16951699
correctionMessage: "Try specifying a different name for the member.",
1700+
hasPublishedDocs: true,
16961701
);
16971702

16981703
/// Parameters:
@@ -1703,6 +1708,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17031708
"Extension types can't implement '{0}'.",
17041709
correctionMessage:
17051710
"Try specifying a different type, or remove the type from the list.",
1711+
hasPublishedDocs: true,
17061712
);
17071713

17081714
/// No parameters.
@@ -1712,6 +1718,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17121718
"The extension type can't implement itself.",
17131719
correctionMessage:
17141720
"Try removing the superinterface that references this extension type.",
1721+
hasPublishedDocs: true,
17151722
);
17161723

17171724
/// Parameters:
@@ -1723,6 +1730,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17231730
"'{0}' is not a supertype of '{1}', the representation type.",
17241731
correctionMessage:
17251732
"Try specifying a different type, or remove the type from the list.",
1733+
hasPublishedDocs: true,
17261734
);
17271735

17281736
/// Parameters:
@@ -1738,6 +1746,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17381746
"representation type of '{3}'.",
17391747
correctionMessage:
17401748
"Try specifying a different type, or remove the type from the list.",
1749+
hasPublishedDocs: true,
17411750
);
17421751

17431752
/// Parameters:
@@ -1750,6 +1759,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17501759
"from implemented types.",
17511760
correctionMessage:
17521761
"Try redeclaring the corresponding member in this extension type.",
1762+
hasPublishedDocs: true,
17531763
);
17541764

17551765
/// No parameters.
@@ -1758,6 +1768,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17581768
'EXTENSION_TYPE_REPRESENTATION_DEPENDS_ON_ITSELF',
17591769
"The extension type representation can't depend on itself.",
17601770
correctionMessage: "Try specifying a different type.",
1771+
hasPublishedDocs: true,
17611772
);
17621773

17631774
/// No parameters.
@@ -1766,6 +1777,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17661777
'EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM',
17671778
"The representation type can't be a bottom type.",
17681779
correctionMessage: "Try specifying a different type.",
1780+
hasPublishedDocs: true,
17691781
);
17701782

17711783
/// Parameters:
@@ -1776,6 +1788,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
17761788
'EXTENSION_TYPE_WITH_ABSTRACT_MEMBER',
17771789
"'{0}' must have a method body because '{1}' is an extension type.",
17781790
correctionMessage: "Try adding a body to '{0}'.",
1791+
hasPublishedDocs: true,
17791792
);
17801793

17811794
static const CompileTimeErrorCode EXTERNAL_FIELD_CONSTRUCTOR_INITIALIZER =
@@ -3740,6 +3753,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
37403753
correctionMessage:
37413754
"Try removing the type parameters from function parameter types and "
37423755
"type parameter bounds.",
3756+
hasPublishedDocs: true,
37433757
);
37443758

37453759
/// Parameters:
@@ -4886,6 +4900,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
48864900
'SUPER_IN_EXTENSION_TYPE',
48874901
"The 'super' keyword can't be used in an extension type because an "
48884902
"extension type doesn't have a superclass.",
4903+
hasPublishedDocs: true,
48894904
);
48904905

48914906
/// No parameters.
@@ -7006,6 +7021,7 @@ class WarningCode extends AnalyzerErrorCode {
70067021
correctionMessage:
70077022
"Try updating this member to match a declaration in a superinterface, "
70087023
"or removing the redeclare annotation.",
7024+
hasPublishedDocs: true,
70097025
);
70107026

70117027
/// An error code indicating use of a removed lint rule.

pkg/analyzer/lib/src/pubspec/pubspec_warning_code.g.dart

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class PubspecWarningCode extends ErrorCode {
5656
'ASSET_MISSING_PATH',
5757
"Asset map entry must contain a 'path' field.",
5858
correctionMessage: "Try adding a 'path' field.",
59+
hasPublishedDocs: true,
5960
);
6061

6162
/// No parameters.
@@ -74,13 +75,15 @@ class PubspecWarningCode extends ErrorCode {
7475
'ASSET_NOT_STRING_OR_MAP',
7576
"An asset value is required to be a file path (string) or map.",
7677
correctionMessage: "Try converting the value to be a string or map.",
78+
hasPublishedDocs: true,
7779
);
7880

7981
/// No parameters.
8082
static const PubspecWarningCode ASSET_PATH_NOT_STRING = PubspecWarningCode(
8183
'ASSET_PATH_NOT_STRING',
8284
"Asset paths are required to be file paths (strings).",
8385
correctionMessage: "Try converting the value to be a string.",
86+
hasPublishedDocs: true,
8487
);
8588

8689
/// Parameters:

pkg/analyzer/messages.yaml

+19-3
Original file line numberDiff line numberDiff line change
@@ -1171,6 +1171,7 @@ CompileTimeErrorCode:
11711171
AWAIT_OF_EXTENSION_TYPE_NOT_FUTURE:
11721172
problemMessage: "The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'."
11731173
correctionMessage: Try removing the `await`, or updating the extension type to implement 'Future'.
1174+
hasPublishedDocs: true
11741175
documentation: |-
11751176
#### Description
11761177

@@ -5182,6 +5183,7 @@ CompileTimeErrorCode:
51825183
EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_FORMAL_PARAMETER:
51835184
problemMessage: "Extension type constructors can't declare super formal parameters."
51845185
correctionMessage: Try removing the super formal parameter declaration.
5186+
hasPublishedDocs: true
51855187
comment: No parameters.
51865188
documentation: |-
51875189
#### Description
@@ -5222,6 +5224,7 @@ CompileTimeErrorCode:
52225224
EXTENSION_TYPE_CONSTRUCTOR_WITH_SUPER_INVOCATION:
52235225
problemMessage: Extension type constructors can't include super initializers.
52245226
correctionMessage: Try removing the super constructor invocation.
5227+
hasPublishedDocs: true
52255228
comment: No parameters.
52265229
documentation: |-
52275230
#### Description
@@ -5254,6 +5257,7 @@ CompileTimeErrorCode:
52545257
EXTENSION_TYPE_DECLARES_INSTANCE_FIELD:
52555258
problemMessage: "Extension types can't declare instance fields."
52565259
correctionMessage: Try replacing the field with a getter.
5260+
hasPublishedDocs: true
52575261
comment: No parameters.
52585262
documentation: |-
52595263
#### Description
@@ -5297,6 +5301,7 @@ CompileTimeErrorCode:
52975301
EXTENSION_TYPE_DECLARES_MEMBER_OF_OBJECT:
52985302
problemMessage: "Extension types can't declare members with the same name as a member declared by 'Object'."
52995303
correctionMessage: Try specifying a different name for the member.
5304+
hasPublishedDocs: true
53005305
comment: No parameters.
53015306
documentation: |-
53025307
#### Description
@@ -5336,6 +5341,7 @@ CompileTimeErrorCode:
53365341
EXTENSION_TYPE_IMPLEMENTS_DISALLOWED_TYPE:
53375342
problemMessage: "Extension types can't implement '{0}'."
53385343
correctionMessage: Try specifying a different type, or remove the type from the list.
5344+
hasPublishedDocs: true
53395345
comment: |-
53405346
Parameters:
53415347
0: the display string of the disallowed type
@@ -5364,6 +5370,7 @@ CompileTimeErrorCode:
53645370
EXTENSION_TYPE_IMPLEMENTS_ITSELF:
53655371
problemMessage: "The extension type can't implement itself."
53665372
correctionMessage: Try removing the superinterface that references this extension type.
5373+
hasPublishedDocs: true
53675374
comment: No parameters.
53685375
documentation: |-
53695376
#### Description
@@ -5402,6 +5409,7 @@ CompileTimeErrorCode:
54025409
EXTENSION_TYPE_IMPLEMENTS_NOT_SUPERTYPE:
54035410
problemMessage: "'{0}' is not a supertype of '{1}', the representation type."
54045411
correctionMessage: Try specifying a different type, or remove the type from the list.
5412+
hasPublishedDocs: true
54055413
comment: |-
54065414
Parameters:
54075415
0: the implemented not extension type
@@ -5440,6 +5448,7 @@ CompileTimeErrorCode:
54405448
EXTENSION_TYPE_IMPLEMENTS_REPRESENTATION_NOT_SUPERTYPE:
54415449
problemMessage: "'{0}', the representation type of '{1}', is not a supertype of '{2}', the representation type of '{3}'."
54425450
correctionMessage: Try specifying a different type, or remove the type from the list.
5451+
hasPublishedDocs: true
54435452
comment: |-
54445453
Parameters:
54455454
0: the representation type of the implemented extension type
@@ -5488,6 +5497,7 @@ CompileTimeErrorCode:
54885497
EXTENSION_TYPE_INHERITED_MEMBER_CONFLICT:
54895498
problemMessage: "The extension type '{0}' has more than one distinct member named '{1}' from implemented types."
54905499
correctionMessage: Try redeclaring the corresponding member in this extension type.
5500+
hasPublishedDocs: true
54915501
comment: |-
54925502
Parameters:
54935503
0: the name of the extension type
@@ -5551,6 +5561,7 @@ CompileTimeErrorCode:
55515561
EXTENSION_TYPE_REPRESENTATION_DEPENDS_ON_ITSELF:
55525562
problemMessage: "The extension type representation can't depend on itself."
55535563
correctionMessage: Try specifying a different type.
5564+
hasPublishedDocs: true
55545565
comment: No parameters.
55555566
documentation: |-
55565567
#### Description
@@ -5595,6 +5606,7 @@ CompileTimeErrorCode:
55955606
EXTENSION_TYPE_REPRESENTATION_TYPE_BOTTOM:
55965607
problemMessage: "The representation type can't be a bottom type."
55975608
correctionMessage: Try specifying a different type.
5609+
hasPublishedDocs: true
55985610
comment: No parameters.
55995611
documentation: |-
56005612
#### Description
@@ -5623,6 +5635,7 @@ CompileTimeErrorCode:
56235635
EXTENSION_TYPE_WITH_ABSTRACT_MEMBER:
56245636
problemMessage: "'{0}' must have a method body because '{1}' is an extension type."
56255637
correctionMessage: "Try adding a body to '{0}'."
5638+
hasPublishedDocs: true
56265639
comment: |-
56275640
Parameters:
56285641
0: the name of the abstract method
@@ -11568,6 +11581,7 @@ CompileTimeErrorCode:
1156811581
NON_COVARIANT_TYPE_PARAMETER_POSITION_IN_REPRESENTATION_TYPE:
1156911582
problemMessage: "An extension type parameter can't be used in a non-covariant position of its representation type."
1157011583
correctionMessage: "Try removing the type parameters from function parameter types and type parameter bounds."
11584+
hasPublishedDocs: true
1157111585
comment: No parameters.
1157211586
documentation: |-
1157311587
#### Description
@@ -15751,6 +15765,7 @@ CompileTimeErrorCode:
1575115765
```
1575215766
SUPER_IN_EXTENSION_TYPE:
1575315767
problemMessage: "The 'super' keyword can't be used in an extension type because an extension type doesn't have a superclass."
15768+
hasPublishedDocs: true
1575415769
comment: No parameters.
1575515770
documentation: |-
1575615771
#### Description
@@ -21181,7 +21196,7 @@ PubspecWarningCode:
2118121196
ASSET_MISSING_PATH:
2118221197
problemMessage: "Asset map entry must contain a 'path' field."
2118321198
correctionMessage: "Try adding a 'path' field."
21184-
hasPublishedDocs: false
21199+
hasPublishedDocs: true
2118521200
comment: No parameters.
2118621201
documentation: |-
2118721202
#### Description
@@ -21260,7 +21275,7 @@ PubspecWarningCode:
2126021275
ASSET_NOT_STRING_OR_MAP:
2126121276
problemMessage: An asset value is required to be a file path (string) or map.
2126221277
correctionMessage: Try converting the value to be a string or map.
21263-
hasPublishedDocs: false
21278+
hasPublishedDocs: true
2126421279
comment: No parameters.
2126521280
documentation: |-
2126621281
#### Description
@@ -21309,7 +21324,7 @@ PubspecWarningCode:
2130921324
ASSET_PATH_NOT_STRING:
2131021325
problemMessage: Asset paths are required to be file paths (strings).
2131121326
correctionMessage: Try converting the value to be a string.
21312-
hasPublishedDocs: false
21327+
hasPublishedDocs: true
2131321328
comment: No parameters.
2131421329
documentation: |-
2131521330
#### Description
@@ -24905,6 +24920,7 @@ WarningCode:
2490524920
REDECLARE_ON_NON_REDECLARING_MEMBER:
2490624921
problemMessage: "The {0} doesn't redeclare a {0} declared in a superinterface."
2490724922
correctionMessage: Try updating this member to match a declaration in a superinterface, or removing the redeclare annotation.
24923+
hasPublishedDocs: true
2490824924
comment: |-
2490924925
An error code indicating the use of a redeclare annotation on a member that does not redeclare.
2491024926

0 commit comments

Comments
 (0)