Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit f4ced82

Browse files
authored
Bump to analyzer 6.1.0 (#4648)
1 parent 9f03663 commit f4ced82

12 files changed

+13
-6
lines changed

lib/src/rules/avoid_return_types_on_setters.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set speed(int ms);
2727
''';
2828

2929
class AvoidReturnTypesOnSetters extends LintRule {
30+
@override
3031
bool get canUseParsedResult => true;
3132

3233
static const LintCode code = LintCode(

lib/src/rules/curly_braces_in_flow_control_structures.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ if (overflowChars != other.overflowChars) {
5151
''';
5252

5353
class CurlyBracesInFlowControlStructures extends LintRule {
54+
@override
5455
bool get canUseParsedResult => true;
5556

5657
static const LintCode code = LintCode(

lib/src/rules/prefer_generic_function_type_aliases.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ typedef F = void Function();
3333
''';
3434

3535
class PreferGenericFunctionTypeAliases extends LintRule {
36+
@override
3637
bool get canUseParsedResult => true;
3738

3839
static const LintCode code = LintCode('prefer_generic_function_type_aliases',

lib/src/rules/slash_for_doc_comments.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ bool isJavaStyle(Comment comment) {
4343
}
4444

4545
class SlashForDocComments extends LintRule {
46+
@override
4647
bool get canUseParsedResult => true;
4748

4849
static const LintCode code = LintCode('slash_for_doc_comments',

lib/src/rules/test_types_in_equals.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ class _Visitor extends SimpleAstVisitor<void> {
113113

114114
String _getTypeName(MethodDeclaration method) {
115115
var parent = method.parent;
116-
if (parent is ClassOrAugmentationDeclaration) {
116+
if (parent is ClassDeclaration) {
117117
return parent.name.lexeme;
118118
} else if (parent is EnumDeclaration) {
119119
return parent.name.lexeme;
120-
} else if (parent is MixinOrAugmentationDeclaration) {
120+
} else if (parent is MixinDeclaration) {
121121
return parent.name.lexeme;
122122
} else if (parent is ExtensionDeclaration) {
123123
return parent.extendedType.toSource();

lib/src/rules/unnecessary_const.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ m(){
3434
''';
3535

3636
class UnnecessaryConst extends LintRule {
37+
@override
3738
bool get canUseParsedResult => true;
3839

3940
static const LintCode code = LintCode(

lib/src/rules/unnecessary_new.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ m(){
3232
''';
3333

3434
class UnnecessaryNew extends LintRule {
35+
@override
3536
bool get canUseParsedResult => true;
3637

3738
static const LintCode code = LintCode(

lib/src/rules/unnecessary_string_escapes.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Remove unnecessary backslashes in strings.
2828
''';
2929

3030
class UnnecessaryStringEscapes extends LintRule {
31+
@override
3132
bool get canUseParsedResult => true;
3233

3334
static const LintCode code = LintCode(

lib/src/rules/use_function_type_syntax_for_parameters.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Iterable<T> where(bool Function(T) predicate) {}
2525
''';
2626

2727
class UseFunctionTypeSyntaxForParameters extends LintRule {
28+
@override
2829
bool get canUseParsedResult => true;
2930

3031
static const LintCode code = LintCode(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
sdk: ^3.0.0
1111

1212
dependencies:
13-
analyzer: ^6.0.0
13+
analyzer: ^6.1.0
1414
args: ^2.1.0
1515
collection: ^1.15.0
1616
http: ">=0.13.0 <2.0.0"

test/rule_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import 'package:analyzer/dart/analysis/results.dart';
99
import 'package:analyzer/error/error.dart';
1010
import 'package:analyzer/file_system/physical_file_system.dart';
1111
import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
12+
import 'package:analyzer/src/analysis_options/apply_options.dart';
1213
import 'package:analyzer/src/generated/engine.dart';
1314
import 'package:analyzer/src/lint/io.dart';
1415
import 'package:analyzer/src/lint/registry.dart';
15-
import 'package:analyzer/src/task/options.dart';
1616
import 'package:analyzer/src/utilities/legacy.dart';
1717
import 'package:linter/src/analyzer.dart';
1818
import 'package:linter/src/ast.dart';
@@ -300,7 +300,7 @@ void _validateExpectedLints(File file, Iterable<AnalysisErrorInfo> errorInfos,
300300
var optionsProvider = AnalysisOptionsProvider();
301301
var optionMap = optionsProvider.getOptionsFromString(analysisOptions);
302302
var optionsImpl = AnalysisOptionsImpl();
303-
applyToAnalysisOptions(optionsImpl, optionMap);
303+
optionsImpl.applyOptions(optionMap);
304304

305305
var features = optionsImpl.contextFeatures;
306306

test/rules/prefer_const_constructors_test.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class PreferConstConstructorsTest extends LintRuleTest {
2020
@override
2121
String get lintRule => 'prefer_const_constructors';
2222

23-
@FailingTest(issue: 'https://github.com/dart-lang/linter/issues/3389')
2423
test_deferred_arg() async {
2524
newFile2('$testPackageLibPath/a.dart', '''
2625
class A {

0 commit comments

Comments
 (0)