Skip to content

Commit 462055b

Browse files
FMorschelCommit Queue
authored andcommitted
[analyzer] Changes the message for MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN
Bug: #61952 Change-Id: I2e02cfec604b270bd7f8cabfec27c387e1b664f1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461861 Commit-Queue: Paul Berry <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Samuel Rawlins <[email protected]> Auto-Submit: Felipe Morschel <[email protected]> Reviewed-by: Paul Berry <[email protected]>
1 parent 8e44f42 commit 462055b

File tree

3 files changed

+52
-45
lines changed

3 files changed

+52
-45
lines changed

pkg/analyzer/lib/src/diagnostic/diagnostic.g.dart

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10186,13 +10186,13 @@ const DiagnosticWithoutArguments missingNameInPartOfDirective =
1018610186
);
1018710187

1018810188
/// Parameters:
10189-
/// String p0: the name of the member
10189+
/// String member: the name of the member
1019010190
const DiagnosticWithArguments<
10191-
LocatableDiagnostic Function({required String p0})
10191+
LocatableDiagnostic Function({required String member})
1019210192
>
1019310193
missingOverrideOfMustBeOverriddenOne = DiagnosticWithArguments(
1019410194
name: 'MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN',
10195-
problemMessage: "Missing concrete implementation of '{0}'.",
10195+
problemMessage: "Missing a required override of '{0}'.",
1019610196
correctionMessage: "Try overriding the missing member.",
1019710197
hasPublishedDocs: true,
1019810198
type: DiagnosticType.STATIC_WARNING,
@@ -10202,20 +10202,20 @@ missingOverrideOfMustBeOverriddenOne = DiagnosticWithArguments(
1020210202
);
1020310203

1020410204
/// Parameters:
10205-
/// String p0: the name of the first member
10206-
/// String p1: the name of the second member
10207-
/// String p2: the number of additional missing members that aren't listed
10205+
/// String firstMember: the name of the first member
10206+
/// String secondMember: the name of the second member
10207+
/// String additionalCount: the number of additional missing members that
10208+
/// aren't listed
1020810209
const DiagnosticWithArguments<
1020910210
LocatableDiagnostic Function({
10210-
required String p0,
10211-
required String p1,
10212-
required String p2,
10211+
required String firstMember,
10212+
required String secondMember,
10213+
required String additionalCount,
1021310214
})
1021410215
>
1021510216
missingOverrideOfMustBeOverriddenThreePlus = DiagnosticWithArguments(
1021610217
name: 'MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN',
10217-
problemMessage:
10218-
"Missing concrete implementations of '{0}', '{1}', and {2} more.",
10218+
problemMessage: "Missing a required override of '{0}', '{1}', and {2} more.",
1021910219
correctionMessage: "Try overriding the missing members.",
1022010220
hasPublishedDocs: true,
1022110221
type: DiagnosticType.STATIC_WARNING,
@@ -10229,14 +10229,17 @@ missingOverrideOfMustBeOverriddenThreePlus = DiagnosticWithArguments(
1022910229
);
1023010230

1023110231
/// Parameters:
10232-
/// String p0: the name of the first member
10233-
/// String p1: the name of the second member
10232+
/// String firstMember: the name of the first member
10233+
/// String secondMember: the name of the second member
1023410234
const DiagnosticWithArguments<
10235-
LocatableDiagnostic Function({required String p0, required String p1})
10235+
LocatableDiagnostic Function({
10236+
required String firstMember,
10237+
required String secondMember,
10238+
})
1023610239
>
1023710240
missingOverrideOfMustBeOverriddenTwo = DiagnosticWithArguments(
1023810241
name: 'MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN',
10239-
problemMessage: "Missing concrete implementations of '{0}' and '{1}'.",
10242+
problemMessage: "Missing a required override of '{0}' and '{1}'.",
1024010243
correctionMessage: "Try overriding the missing members.",
1024110244
hasPublishedDocs: true,
1024210245
type: DiagnosticType.STATIC_WARNING,
@@ -19537,31 +19540,31 @@ LocatableDiagnostic _withArgumentsMissingExceptionValue({required String p0}) {
1953719540
}
1953819541

1953919542
LocatableDiagnostic _withArgumentsMissingOverrideOfMustBeOverriddenOne({
19540-
required String p0,
19543+
required String member,
1954119544
}) {
1954219545
return LocatableDiagnosticImpl(diag.missingOverrideOfMustBeOverriddenOne, [
19543-
p0,
19546+
member,
1954419547
]);
1954519548
}
1954619549

1954719550
LocatableDiagnostic _withArgumentsMissingOverrideOfMustBeOverriddenThreePlus({
19548-
required String p0,
19549-
required String p1,
19550-
required String p2,
19551+
required String firstMember,
19552+
required String secondMember,
19553+
required String additionalCount,
1955119554
}) {
1955219555
return LocatableDiagnosticImpl(
1955319556
diag.missingOverrideOfMustBeOverriddenThreePlus,
19554-
[p0, p1, p2],
19557+
[firstMember, secondMember, additionalCount],
1955519558
);
1955619559
}
1955719560

1955819561
LocatableDiagnostic _withArgumentsMissingOverrideOfMustBeOverriddenTwo({
19559-
required String p0,
19560-
required String p1,
19562+
required String firstMember,
19563+
required String secondMember,
1956119564
}) {
1956219565
return LocatableDiagnosticImpl(diag.missingOverrideOfMustBeOverriddenTwo, [
19563-
p0,
19564-
p1,
19566+
firstMember,
19567+
secondMember,
1956519568
]);
1956619569
}
1956719570

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

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4641,32 +4641,36 @@ class WarningCode {
46414641
diag.invalidWidgetPreviewPrivateArgument;
46424642

46434643
/// Parameters:
4644-
/// String p0: the name of the member
4644+
/// String member: the name of the member
46454645
static const DiagnosticWithArguments<
4646-
LocatableDiagnostic Function({required String p0})
4646+
LocatableDiagnostic Function({required String member})
46474647
>
46484648
missingOverrideOfMustBeOverriddenOne =
46494649
diag.missingOverrideOfMustBeOverriddenOne;
46504650

46514651
/// Parameters:
4652-
/// String p0: the name of the first member
4653-
/// String p1: the name of the second member
4654-
/// String p2: the number of additional missing members that aren't listed
4652+
/// String firstMember: the name of the first member
4653+
/// String secondMember: the name of the second member
4654+
/// String additionalCount: the number of additional missing members that
4655+
/// aren't listed
46554656
static const DiagnosticWithArguments<
46564657
LocatableDiagnostic Function({
4657-
required String p0,
4658-
required String p1,
4659-
required String p2,
4658+
required String firstMember,
4659+
required String secondMember,
4660+
required String additionalCount,
46604661
})
46614662
>
46624663
missingOverrideOfMustBeOverriddenThreePlus =
46634664
diag.missingOverrideOfMustBeOverriddenThreePlus;
46644665

46654666
/// Parameters:
4666-
/// String p0: the name of the first member
4667-
/// String p1: the name of the second member
4667+
/// String firstMember: the name of the first member
4668+
/// String secondMember: the name of the second member
46684669
static const DiagnosticWithArguments<
4669-
LocatableDiagnostic Function({required String p0, required String p1})
4670+
LocatableDiagnostic Function({
4671+
required String firstMember,
4672+
required String secondMember,
4673+
})
46704674
>
46714675
missingOverrideOfMustBeOverriddenTwo =
46724676
diag.missingOverrideOfMustBeOverriddenTwo;

pkg/analyzer/messages.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26557,9 +26557,9 @@ WarningCode:
2655726557
```
2655826558
MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN_ONE:
2655926559
parameters:
26560-
String p0: the name of the member
26560+
String member: the name of the member
2656126561
sharedName: MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN
26562-
problemMessage: "Missing concrete implementation of '#p0'."
26562+
problemMessage: "Missing a required override of '#member'."
2656326563
correctionMessage: Try overriding the missing member.
2656426564
hasPublishedDocs: true
2656526565
documentation: |-
@@ -26616,19 +26616,19 @@ WarningCode:
2661626616
```
2661726617
MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN_TWO:
2661826618
parameters:
26619-
String p0: the name of the first member
26620-
String p1: the name of the second member
26619+
String firstMember: the name of the first member
26620+
String secondMember: the name of the second member
2662126621
sharedName: MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN
26622-
problemMessage: "Missing concrete implementations of '#p0' and '#p1'."
26622+
problemMessage: "Missing a required override of '#firstMember' and '#secondMember'."
2662326623
correctionMessage: Try overriding the missing members.
2662426624
hasPublishedDocs: true
2662526625
MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN_THREE_PLUS:
2662626626
parameters:
26627-
String p0: the name of the first member
26628-
String p1: the name of the second member
26629-
String p2: the number of additional missing members that aren't listed
26627+
String firstMember: the name of the first member
26628+
String secondMember: the name of the second member
26629+
String additionalCount: the number of additional missing members that aren't listed
2663026630
sharedName: MISSING_OVERRIDE_OF_MUST_BE_OVERRIDDEN
26631-
problemMessage: "Missing concrete implementations of '#p0', '#p1', and #p2 more."
26631+
problemMessage: "Missing a required override of '#firstMember', '#secondMember', and #additionalCount more."
2663226632
correctionMessage: Try overriding the missing members.
2663326633
hasPublishedDocs: true
2663426634
MISSING_REQUIRED_PARAM:

0 commit comments

Comments
 (0)