mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:09:48 +00:00
Add dartfix support for prefer_contains
Change-Id: I0f3c8a6198560ed36d465ebd08c40ed438a79bf4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135490 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
parent
bcc0900e6a
commit
1cc9413926
|
@ -63,6 +63,7 @@ final allFixes = <DartFixInfo>[
|
||||||
LintFixInfo.preferAdjacentStringConcatenation,
|
LintFixInfo.preferAdjacentStringConcatenation,
|
||||||
LintFixInfo.preferCollectionLiterals,
|
LintFixInfo.preferCollectionLiterals,
|
||||||
LintFixInfo.preferConditionalAssignment,
|
LintFixInfo.preferConditionalAssignment,
|
||||||
|
LintFixInfo.preferContains,
|
||||||
LintFixInfo.preferEqualForDefaultValues,
|
LintFixInfo.preferEqualForDefaultValues,
|
||||||
LintFixInfo.preferFinalFields,
|
LintFixInfo.preferFinalFields,
|
||||||
LintFixInfo.preferFinalLocals,
|
LintFixInfo.preferFinalLocals,
|
||||||
|
@ -321,6 +322,13 @@ class LintFixInfo extends DartFixInfo {
|
||||||
isPedantic: true,
|
isPedantic: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static final preferContains = LintFixInfo(
|
||||||
|
'prefer_contains',
|
||||||
|
DartFixKind.CONVERT_TO_CONTAINS,
|
||||||
|
"Convert to using 'contains'.",
|
||||||
|
isPedantic: true,
|
||||||
|
);
|
||||||
|
|
||||||
static final preferEqualForDefaultValues = LintFixInfo(
|
static final preferEqualForDefaultValues = LintFixInfo(
|
||||||
'prefer_equal_for_default_values',
|
'prefer_equal_for_default_values',
|
||||||
DartFixKind.REPLACE_COLON_WITH_EQUALS,
|
DartFixKind.REPLACE_COLON_WITH_EQUALS,
|
||||||
|
|
Loading…
Reference in a new issue