From 63d96273e16580c16f7178d25746f2f771a94335 Mon Sep 17 00:00:00 2001 From: Dmitry Krutskikh Date: Mon, 7 Mar 2022 07:34:10 +0300 Subject: [PATCH] chore: restrict `analyzer` version to `>=2.4.0 <3.4.0` --- CHANGELOG.md | 1 + .../rules/rules_list/avoid_returning_widgets/visitor.dart | 1 + .../rules/rules_list/avoid_unnecessary_setstate/visitor.dart | 1 + .../rules/rules_list/prefer_extracting_callbacks/visitor.dart | 1 + .../rules/rules_list/prefer_single_widget_per_file/visitor.dart | 1 + pubspec.yaml | 2 +- 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 123d908400..47a133775f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * feat: add static code diagnostics `avoid-collection-methods-with-unrelated-types`, `ban-name`, `tag-name`. * fix: added parameter constant check in `avoid-border-all`. +* chore: restrict `analyzer` version to `>=2.4.0 <3.4.0`. * chore: set min `mocktail` version to `^0.3.0`. ## 4.11.0 diff --git a/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_returning_widgets/visitor.dart b/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_returning_widgets/visitor.dart index 456e5be364..50a4b87f0b 100644 --- a/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_returning_widgets/visitor.dart +++ b/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_returning_widgets/visitor.dart @@ -36,6 +36,7 @@ class _Visitor extends RecursiveAstVisitor { @override void visitClassDeclaration(ClassDeclaration node) { + // ignore: deprecated_member_use final classType = node.extendsClause?.superclass2.type; if (!isWidgetOrSubclass(classType) && !isWidgetStateOrSubclass(classType)) { return; diff --git a/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_unnecessary_setstate/visitor.dart b/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_unnecessary_setstate/visitor.dart index 4b220889a8..710d99ea18 100644 --- a/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_unnecessary_setstate/visitor.dart +++ b/lib/src/analyzers/lint_analyzer/rules/rules_list/avoid_unnecessary_setstate/visitor.dart @@ -14,6 +14,7 @@ class _Visitor extends RecursiveAstVisitor { void visitClassDeclaration(ClassDeclaration node) { super.visitClassDeclaration(node); + // ignore: deprecated_member_use final type = node.extendsClause?.superclass2.type; if (type == null || !isWidgetStateOrSubclass(type)) { return; diff --git a/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_extracting_callbacks/visitor.dart b/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_extracting_callbacks/visitor.dart index 64bce38799..ed09849a2f 100644 --- a/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_extracting_callbacks/visitor.dart +++ b/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_extracting_callbacks/visitor.dart @@ -11,6 +11,7 @@ class _Visitor extends SimpleAstVisitor { @override void visitClassDeclaration(ClassDeclaration node) { + // ignore: deprecated_member_use final classType = node.extendsClause?.superclass2.type; if (!isWidgetOrSubclass(classType) && !isWidgetStateOrSubclass(classType)) { return; diff --git a/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_single_widget_per_file/visitor.dart b/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_single_widget_per_file/visitor.dart index 09f4746ef3..344b5fbb28 100644 --- a/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_single_widget_per_file/visitor.dart +++ b/lib/src/analyzers/lint_analyzer/rules/rules_list/prefer_single_widget_per_file/visitor.dart @@ -15,6 +15,7 @@ class _Visitor extends SimpleAstVisitor { void visitClassDeclaration(ClassDeclaration node) { super.visitClassDeclaration(node); + // ignore: deprecated_member_use final classType = node.extendsClause?.superclass2.type; if (isWidgetOrSubclass(classType) && (!_ignorePrivateWidgets || !Identifier.isPrivateName(node.name.name))) { diff --git a/pubspec.yaml b/pubspec.yaml index 30d231bd52..c80cfb6a91 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ environment: sdk: ">=2.14.0 <3.0.0" dependencies: - analyzer: ">=2.4.0 <3.3.0" + analyzer: ">=2.4.0 <3.4.0" analyzer_plugin: ">=0.8.0 <0.10.0" ansicolor: ^2.0.1 args: ^2.0.0