diff --git a/CHANGELOG.md b/CHANGELOG.md index 18713131c08..a027dd95eb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -161,8 +161,48 @@ #### Linter -Updated the Linter to `1.28.0`, which includes changes that +Updated the Linter to `1.29.0`, which includes changes that +- add new lint: `dangling_library_doc_comments`. +- fix `no_leading_underscores_for_local_identifiers` to not report super formals + as local variables. +- fix `unnecessary_overrides` false negatives. +- fix `cancel_subscriptions` for nullable fields. +- add new lint: `collection_methods_unrelated_type`. +- update `library_names` to support unnamed libraries. +- fix `unnecessary_parenthesis` support for as-expressions. +- fix `use_build_context_synchronously` to check for context property accesses. +- fix false positive in `comment_references`. +- improved unrelated type checks to handle enums and cascades. +- fix `unnecessary_brace_in_string_interps` for `this` expressions . +- update `use_build_context_synchronously` for `BuildContext.mounted`. +- improve `flutter_style_todos` to handle more cases. +- fix `use_build_context_synchronously` to check for `BuildContext`s in named + expressions. +- fix `exhaustive_cases` to check parenthesized expressions +- improves performance for: + - `avoid_null_checks_in_equality_operators`. + - `join_return_with_statement`. + - `recursive_getters`. + - `unnecessary_lambdas`. + - `diagnostic_describe_all_properties`. + - `prefer_foreach`. + - `avoid_escaping_inner_quotes`. + - `cascade_invocations`. + - `tighten_type_of_initializing_formals`. + - `prefer_interpolation_to_compose_strings`. + - `prefer_constructors_over_static_methods`. + - `avoid_returning_null`. + - `parameter_assignments`. + - `prefer_constructors_over_static_methods`. + - `prefer_interpolation_to_compose_strings`. + - `avoid_returning_null`. + - `avoid_returning_this`. + - `flutter_style_todos`. + - `avoid_positional_boolean_parameters`. + - `prefer_const_constructors`. +- add new lint: `implicit_call_tearoffs`. +- add new lint: `unnecessary_library_directive`. - update `avoid_redundant_argument_values` to work with enum declarations. - improve performance for `prefer_contains`. - add new lint: `unreachable_from_main`. diff --git a/DEPS b/DEPS index 3f3a0f612d1..b3060ff4e3e 100644 --- a/DEPS +++ b/DEPS @@ -136,7 +136,7 @@ vars = { "intl_rev": "442193ccd19a8e36a07fcc3b3cac0e58c6f9c542", "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1", "json_rpc_2_rev": "805e6536dd961d66f6b8cd46d8f3e61774f957c9", - "linter_rev": "f2c55484e8ebda0aec8c2fea637b3bd5b17258ca", # 1.28.0 + "linter_rev": "657fa6d60373c144777ddb3ca0ab6ee7805ea2b3", # 1.29.0 "lints_rev": "16bdefe1df529262a6596f79e91003ddbdbd3890", "logging_rev": "f322480fb9d9e83e677c08db6d09067059f7ff74", "markdown_rev": "9ff4a9f1d37c763f827084ba28a3d0bfec6b5d67", diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml index 44a5f7828f3..18bab3de3c5 100644 --- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml +++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml @@ -1767,6 +1767,8 @@ LintCode.cast_nullable_to_non_nullable: status: needsEvaluation LintCode.close_sinks: status: needsEvaluation +LintCode.collection_methods_unrelated_type: + status: needsEvaluation LintCode.combinators_ordering: status: hasFix LintCode.comment_references: @@ -1779,6 +1781,8 @@ LintCode.control_flow_in_finally: status: needsEvaluation LintCode.curly_braces_in_flow_control_structures: status: hasFix +LintCode.dangling_library_doc_comments: + status: needsEvaluation LintCode.depend_on_referenced_packages: status: needsFix LintCode.deprecated_consistency: @@ -1809,6 +1813,8 @@ LintCode.hash_and_equals: status: hasFix LintCode.implementation_imports: status: needsEvaluation +LintCode.implicit_call_tearoffs: + status: needsEvaluation LintCode.invariant_booleans: status: needsEvaluation LintCode.iterable_contains_unrelated_type: @@ -2014,6 +2020,8 @@ LintCode.unnecessary_lambdas: status: hasFix LintCode.unnecessary_late: status: hasFix +LintCode.unnecessary_library_directive: + status: needsEvaluation LintCode.unnecessary_new: status: hasFix LintCode.unnecessary_null_aware_assignments: diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart index ca211c5d29c..6434447e5c8 100644 --- a/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart +++ b/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart @@ -97,7 +97,6 @@ class B extends A { '''); } - @FailingTest(issue: 'https://github.com/dart-lang/linter/issues/1997') Future test_method_generic() async { await resolveTestCode(''' class A { @@ -123,7 +122,6 @@ class B extends A { '''); } - @FailingTest(issue: 'https://github.com/dart-lang/linter/issues/1997') Future test_method_nullSafety_optIn_fromOptOut() async { createAnalysisOptionsFile(lints: [lintCode]); newFile('$testPackageLibPath/a.dart', r''' diff --git a/pkg/analysis_server/test/src/services/correction/fix/rename_method_parameter_test.dart b/pkg/analysis_server/test/src/services/correction/fix/rename_method_parameter_test.dart index 70faf54d2fb..3af25c97f60 100644 --- a/pkg/analysis_server/test/src/services/correction/fix/rename_method_parameter_test.dart +++ b/pkg/analysis_server/test/src/services/correction/fix/rename_method_parameter_test.dart @@ -23,20 +23,6 @@ class RenameMethodParameterTest extends FixProcessorLintTest { @override String get lintCode => LintNames.avoid_renaming_method_parameters; - Future test_conflict_parameters() async { - await resolveTestCode(''' -class A { - void m(a, b) {} -} -class B extends A { - void m(b, a) { - } -} -'''); - await assertNoFix( - errorFilter: (error) => error.message.contains("parameter 'a'")); - } - Future test_local_variable() async { await resolveTestCode(''' class A {