Skip to content

Commit 93558ad

Browse files
srawlinsCommit Queue
authored andcommitted
Revert "analyzer: Convert all remaining HintCodes to be WarningCodes"
This reverts commit 7e9e70f. Reason for revert: Broke flutter customers. Original change's description: > analyzer: Convert all remaining HintCodes to be WarningCodes > > Fixes #50796 > > In this change, I only change each previous HintCode to a WarningCode > by moving it in the YAML file to the WarningCode section. And I change > each code's `type` from `hint` to `staticWarning`. > > This does indicate that the structure of the YAML could be simplified > to remove the top-level sections like `WarningCode`, but I will let > someone else make that change independently. > > Change-Id: I35c42d9cc8afa9602aadd22143bb32196728f3e5 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467444 > Reviewed-by: Paul Berry <paulberry@google.com> > Commit-Queue: Samuel Rawlins <srawlins@google.com> No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Ie9a58321c902965b804a27b166732ee7bf238f5d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467881 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Auto-Submit: Samuel Rawlins <srawlins@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
1 parent 9117097 commit 93558ad

File tree

2 files changed

+297
-296
lines changed

2 files changed

+297
-296
lines changed

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3189,7 +3189,7 @@ deprecatedColonForDefaultValue = DiagnosticWithoutArgumentsImpl(
31893189
"will not be supported in language version 3.0 and later.",
31903190
correctionMessage: "Try replacing the colon with an equal sign.",
31913191
hasPublishedDocs: true,
3192-
type: DiagnosticType.STATIC_WARNING,
3192+
type: DiagnosticType.HINT,
31933193
uniqueName: 'deprecated_colon_for_default_value',
31943194
expectedTypes: [],
31953195
);
@@ -3314,7 +3314,7 @@ deprecatedInstantiate = DiagnosticWithArguments(
33143314
expectedTypes: [ExpectedType.object],
33153315
);
33163316

3317-
/// A warning code indicating reference to a deprecated lint.
3317+
/// A hint code indicating reference to a deprecated lint.
33183318
///
33193319
/// Parameters:
33203320
/// String ruleName: the rule name
@@ -3332,7 +3332,7 @@ deprecatedLint = DiagnosticWithArguments(
33323332
expectedTypes: [ExpectedType.string],
33333333
);
33343334

3335-
/// A warning code indicating reference to a deprecated lint.
3335+
/// A hint code indicating reference to a deprecated lint.
33363336
///
33373337
/// Parameters:
33383338
/// String deprecatedRuleName: the deprecated lint name
@@ -3364,7 +3364,7 @@ deprecatedMemberUse = DiagnosticWithArguments(
33643364
correctionMessage:
33653365
"Try replacing the use of the deprecated member with the replacement.",
33663366
hasPublishedDocs: true,
3367-
type: DiagnosticType.STATIC_WARNING,
3367+
type: DiagnosticType.HINT,
33683368
uniqueName: 'deprecated_member_use',
33693369
withArguments: _withArgumentsDeprecatedMemberUse,
33703370
expectedTypes: [ExpectedType.string],
@@ -3382,7 +3382,7 @@ deprecatedMemberUseWithMessage = DiagnosticWithArguments(
33823382
correctionMessage:
33833383
"Try replacing the use of the deprecated member with the replacement.",
33843384
hasPublishedDocs: true,
3385-
type: DiagnosticType.STATIC_WARNING,
3385+
type: DiagnosticType.HINT,
33863386
uniqueName: 'deprecated_member_use_with_message',
33873387
withArguments: _withArgumentsDeprecatedMemberUseWithMessage,
33883388
expectedTypes: [ExpectedType.string, ExpectedType.string],
@@ -6769,7 +6769,7 @@ importDeferredLibraryWithLoadFunction = DiagnosticWithoutArgumentsImpl(
67696769
"Try changing the import to not be deferred, or rename the function in "
67706770
"the imported library.",
67716771
hasPublishedDocs: true,
6772-
type: DiagnosticType.STATIC_WARNING,
6772+
type: DiagnosticType.HINT,
67736773
uniqueName: 'import_deferred_library_with_load_function',
67746774
expectedTypes: [],
67756775
);
@@ -16341,7 +16341,7 @@ unnecessaryImport = DiagnosticWithArguments(
1634116341
"also provided by the import of '{1}'.",
1634216342
correctionMessage: "Try removing the import directive.",
1634316343
hasPublishedDocs: true,
16344-
type: DiagnosticType.STATIC_WARNING,
16344+
type: DiagnosticType.HINT,
1634516345
uniqueName: 'unnecessary_import',
1634616346
withArguments: _withArgumentsUnnecessaryImport,
1634716347
expectedTypes: [ExpectedType.string, ExpectedType.string],

0 commit comments

Comments
 (0)