1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-03 08:19:13 +00:00

linter 1.29.0

Downstream fixes:

* https://github.com/flutter/flutter/pull/113794
* https://github.com/flutter/plugins/pull/6669
* https://github.com/flutter/engine/pull/37321
* https://github.com/dart-lang/linter/pull/3775
* https://github.com/dart-lang/linter/pull/3776

* cl/482614222
* cl/482654980
* cl/482744309
* cl/485129394
* cl/485139323
* ...

Upstream:

* https://github.com/dart-lang/sdk/issues/50263

Change-Id: I259cb0c28464b1e513d9a1931b7c680a2a04a0a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264961
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
pq 2022-11-07 22:02:42 +00:00 committed by Commit Queue
parent 289aa509cd
commit ca52c30092
5 changed files with 50 additions and 18 deletions

View File

@ -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`.

2
DEPS
View File

@ -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",

View File

@ -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:

View File

@ -97,7 +97,6 @@ class B extends A {
''');
}
@FailingTest(issue: 'https://github.com/dart-lang/linter/issues/1997')
Future<void> test_method_generic() async {
await resolveTestCode('''
class A<T> {
@ -123,7 +122,6 @@ class B extends A<int> {
''');
}
@FailingTest(issue: 'https://github.com/dart-lang/linter/issues/1997')
Future<void> test_method_nullSafety_optIn_fromOptOut() async {
createAnalysisOptionsFile(lints: [lintCode]);
newFile('$testPackageLibPath/a.dart', r'''

View File

@ -23,20 +23,6 @@ class RenameMethodParameterTest extends FixProcessorLintTest {
@override
String get lintCode => LintNames.avoid_renaming_method_parameters;
Future<void> 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<void> test_local_variable() async {
await resolveTestCode('''
class A {