[M] Change in dart/sdk[main]: linter 1.33.0 rc

1 view
Skip to first unread message

Phil Quitslund (Gerrit)

unread,
Feb 2, 2023, 5:20:28 PM2/2/23
to Brian Wilkerson, rev...@dartlang.org

Attention is currently required from: Brian Wilkerson, Danny Tuppeny.

Phil Quitslund would like Brian Wilkerson to review this change.

View Change

linter 1.33.0 rc

Some notes.

* There are a number of tests that should get decoupled from the linter being pulled into `DEPS`. Instead of depending on the state of lints there, we should update the tests instead to use a more hermetic environment. (See for example `options_rule_validator_test.dart` for how that might look.)


Downstream (blocking) fixes:

* https://github.com/flutter/flutter/pull/119736
* https://github.com/flutter/gallery/pull/878


Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
---
M CHANGELOG.md
M DEPS
M pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
M pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
M pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart
M pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
M pkg/analyzer_utilities/analysis_options.yaml
M pkg/test_runner/analysis_options.yaml
8 files changed, 98 insertions(+), 31 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d43b9e7..0b17b30 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -125,15 +125,30 @@

#### Linter

-Updates the Linter to `1.32.0`, which includes changes that
+Updates the Linter to `1.33.0`, which includes changes that

+- add new lint: `unnecessary_breaks`.
+- remove support for:
+ - `enable_null_safety`
+ - `invariant_booleans`
+ - `prefer_bool_in_asserts`
+ - `prefer_equal_for_default_values`
+ - `super_goes_last`
+- fix `unnecessary_parenthesis` false-positives with null-aware expressions.
+- fix `void_checks` to allow assignments of `Future<dynamic>?` to parameters
+ typed `FutureOr<void>?`.
+- fix `use_build_context_synchronously` in if conditions.
+- fix a false positive for `avoid_private_typedef_functions` with generalized type aliases.
+- update `unnecessary_parenthesis` to detect some doubled parens.
+- update `void_checks` to allow returning `Never` as void.
+- update `no_adjacent_strings_in_list` to support set literals and for- and
+ if-elements.
- update `avoid_types_as_parameter_names` to handle type variables.
- update `avoid_positional_boolean_parameters` to handle typedefs.
-- improve `unnecessary_parenthesis` support for property accesses and method invocations.
- update `avoid_redundant_argument_values` to check parameters of redirecting constructors.
- improve performance for `prefer_const_literals_to_create_immutables`.
- update `use_build_context_synchronously` to check context properties.
-- fix a false positive for `avoid_private_typedef_functions` with generalized type aliases.
+- improve `unnecessary_parenthesis` support for property accesses and method invocations.

#### Migration tool removal

diff --git a/DEPS b/DEPS
index 2cc3378..be70b4a 100644
--- a/DEPS
+++ b/DEPS
@@ -145,7 +145,7 @@
"http_parser_rev": "6f73e4a399df013ded8f4c81f151d122b36d361b",
"intl_rev": "946c34c155073c0c7dbbc6ce06f5d0c35570019d",
"json_rpc_2_rev": "e73c4ad2f7b5cbf083569f00ac7fe6d7151afe22",
- "linter_rev": "8f7b75f8a3501ca2c4d5bbc1f003d90d66447544", # 1.32.0
+ "linter_rev": "a2b19bb4c129139019d8270e261313e0363524c5", # 1.33.0
"lints_rev": "dfded5e265015f21ce154577fe8488dc244e33c2",
"logging_rev": "399100a2737e3924dbd4d6f916846366c0612a53",
"markdown_rev": "ee3f4e976efcfed87c6ec78364bc2dd3c6e717b9", # https://github.com/dart-lang/markdown/pull/494
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 498e661..ce75e2b 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
@@ -2019,6 +2019,8 @@
status: needsEvaluation
LintCode.unnecessary_brace_in_string_interps:
status: hasFix
+LintCode.unnecessary_breaks:
+ status: needsEvaluation
LintCode.unnecessary_const:
status: hasFix
LintCode.unnecessary_constructor_name:
diff --git a/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart b/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
index 41acfa7..4006329 100644
--- a/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
+++ b/pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
@@ -4,6 +4,8 @@

import 'package:analysis_server/lsp_protocol/protocol.dart';
import 'package:analysis_server/src/analysis_server.dart';
+import 'package:analyzer/src/lint/linter.dart';
+import 'package:analyzer/src/lint/registry.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart' as plugin;
import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
import 'package:linter/src/rules.dart';
@@ -19,6 +21,18 @@
});
}

+/// A version of `camel_case_types` that is deprecated.
+class DeprecatedCamelCaseTypes extends LintRule {
+ DeprecatedCamelCaseTypes()
+ : super(
+ name: 'camel_case_types',
+ group: Group.style,
+ state: State.deprecated(),
+ description: '',
+ details: '',
+ );
+}
+
@reflectiveTest
class FixesCodeActionsTest extends AbstractCodeActionsTest {
/// Helper to check plugin fixes for [filePath].
@@ -84,40 +98,57 @@

Future<void> test_analysisOptions() async {
registerLintRules();
- const content = r'''
+
+ // To ensure there's an associated code action, we manually deprecate an
+ // existing lint (`camel_case_types`) for the duration of this test.
+
+ // Fetch the "actual" lint so we can restore it after the test.
+ var camelCaseTypes = Registry.ruleRegistry.getRule('camel_case_types')!;
+
+ // Overwrite it.
+ Registry.ruleRegistry.register(DeprecatedCamelCaseTypes());
+
+ // Now we can assume it will have an action associated...
+
+ try {
+ const content = r'''
linter:
rules:
- prefer_is_empty
- - [[invariant_booleans]]
+ - [[camel_case_types]]
- lines_longer_than_80_chars
''';

- const expectedContent = r'''
+ const expectedContent = r'''
linter:
rules:
- prefer_is_empty
- lines_longer_than_80_chars
''';

- newFile(analysisOptionsPath, withoutMarkers(content));
- await initialize(
- textDocumentCapabilities: withCodeActionKinds(
- emptyTextDocumentClientCapabilities, [CodeActionKind.QuickFix]),
- );
+ newFile(analysisOptionsPath, withoutMarkers(content));
+ await initialize(
+ textDocumentCapabilities: withCodeActionKinds(
+ emptyTextDocumentClientCapabilities, [CodeActionKind.QuickFix]),
+ );

- // Expect a fix.
- final codeActions = await getCodeActions(analysisOptionsUri,
- range: rangeFromMarkers(content));
- final fix = findEditAction(codeActions,
- CodeActionKind('quickfix.removeLint'), "Remove 'invariant_booleans'")!;
+ // Expect a fix.
+ final codeActions = await getCodeActions(analysisOptionsUri,
+ range: rangeFromMarkers(content));
+ final fix = findEditAction(codeActions,
+ CodeActionKind('quickfix.removeLint'), "Remove 'camel_case_types'")!;

- // Ensure it makes the correct edits.
- final edit = fix.edit!;
- final contents = {
- analysisOptionsPath: withoutMarkers(content),
- };
- applyChanges(contents, edit.changes!);
- expect(contents[analysisOptionsPath], equals(expectedContent));
+ // Ensure it makes the correct edits.
+ final edit = fix.edit!;
+ final contents = {
+ analysisOptionsPath: withoutMarkers(content),
+ };
+ applyChanges(contents, edit.changes!);
+ expect(contents[analysisOptionsPath], equals(expectedContent));
+ } finally {
+ // Restore the "real" `camel_case_types`.
+ Registry.ruleRegistry.register(camelCaseTypes);
+ }
}

Future<void> test_appliesCorrectEdits_withDocumentChangesSupport() async {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart
index deb6eb4..7ff1167 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart
@@ -24,7 +24,7 @@
linter:
rules:
- camel_case_types
- - super_goes_last
+ - avoid_returning_null
''', '''
linter:
rules:
@@ -36,7 +36,7 @@
await assertHasFix('''
linter:
rules:
- - super_goes_last
+ - avoid_returning_null
''', '''
''');
}
@@ -46,7 +46,7 @@
linter:
rules:
- camel_case_types
- - super_goes_last
+ - avoid_returning_null
section:
- foo
''', '''
@@ -67,7 +67,7 @@
linter:
rules:
- camel_case_types
- - super_goes_last
+ - avoid_returning_null
''', '''
analyzer:
exclude:
diff --git a/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
index 3e75f38..84987c7 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
@@ -6,6 +6,7 @@
import 'package:analysis_server/src/services/correction/fix/analysis_options/fix_generator.dart';
import 'package:analyzer/error/error.dart';
import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/lint/state.dart';
import 'package:analyzer/src/task/options.dart';
import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart'
@@ -47,7 +48,7 @@
content,
sourceFactory,
'/',
- null,
+ dart2_12,
);
if (errorFilter != null) {
if (errors.length == 1) {
diff --git a/pkg/analyzer_utilities/analysis_options.yaml b/pkg/analyzer_utilities/analysis_options.yaml
index 3596ce5..712121e 100644
--- a/pkg/analyzer_utilities/analysis_options.yaml
+++ b/pkg/analyzer_utilities/analysis_options.yaml
@@ -12,7 +12,6 @@
# Enable when we require Dart 2.19.0.
#- dangling_library_doc_comments
- depend_on_referenced_packages
- - enable_null_safety
- implicit_call_tearoffs
- library_annotations
- unawaited_futures
diff --git a/pkg/test_runner/analysis_options.yaml b/pkg/test_runner/analysis_options.yaml
index 3f45629..bd9e22a 100644
--- a/pkg/test_runner/analysis_options.yaml
+++ b/pkg/test_runner/analysis_options.yaml
@@ -7,7 +7,6 @@
linter:
rules:
avoid_bool_literals_in_conditional_expressions: true
- avoid_returning_null: true
avoid_unused_constructor_parameters: true
cancel_subscriptions: true
comment_references: true

To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
Gerrit-Change-Number: 280054
Gerrit-PatchSet: 12
Gerrit-Owner: Phil Quitslund <pquit...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
Gerrit-CC: Oleh Prypin <opr...@google.com>
Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-MessageType: newchange

Phil Quitslund (Gerrit)

unread,
Feb 2, 2023, 5:20:30 PM2/2/23
to rev...@dartlang.org, Brian Wilkerson, CBuild, Commit Queue, Danny Tuppeny, Oleh Prypin

Attention is currently required from: Brian Wilkerson, Danny Tuppeny.

View Change

    To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
    Gerrit-Change-Number: 280054
    Gerrit-PatchSet: 12
    Gerrit-Owner: Phil Quitslund <pquit...@google.com>
    Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
    Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-CC: Oleh Prypin <opr...@google.com>
    Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
    Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
    Gerrit-Comment-Date: Thu, 02 Feb 2023 22:20:25 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    CBuild (Gerrit)

    unread,
    Feb 2, 2023, 5:48:24 PM2/2/23
    to Phil Quitslund, rev...@dartlang.org, Brian Wilkerson, Commit Queue, Danny Tuppeny, Oleh Prypin

    Attention is currently required from: Brian Wilkerson, Danny Tuppeny.

    go/dart-cbuild result: SUCCESS

    Details: https://goto.google.com/dart-cbuild/find/e4a323a2b8e3ebe827ae6af7a53f511eb4769e4f

    View Change

      To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
      Gerrit-Change-Number: 280054
      Gerrit-PatchSet: 12
      Gerrit-Owner: Phil Quitslund <pquit...@google.com>
      Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
      Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
      Gerrit-CC: Oleh Prypin <opr...@google.com>
      Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
      Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
      Gerrit-Comment-Date: Thu, 02 Feb 2023 22:48:18 +0000

      CBuild (Gerrit)

      unread,
      Feb 3, 2023, 2:00:52 PM2/3/23
      to Phil Quitslund, rev...@dartlang.org, Brian Wilkerson, Commit Queue, Danny Tuppeny, Oleh Prypin

      Attention is currently required from: Brian Wilkerson, Danny Tuppeny, Phil Quitslund.

      go/dart-cbuild result: SUCCESS

      Details: https://goto.google.com/dart-cbuild/find/b61ed2972e991815128a7993bd1aa4147bdddeb3

      View Change

        To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
        Gerrit-Change-Number: 280054
        Gerrit-PatchSet: 13
        Gerrit-Owner: Phil Quitslund <pquit...@google.com>
        Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
        Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
        Gerrit-CC: Oleh Prypin <opr...@google.com>
        Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
        Gerrit-Attention: Phil Quitslund <pquit...@google.com>
        Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Comment-Date: Fri, 03 Feb 2023 19:00:47 +0000

        Phil Quitslund (Gerrit)

        unread,
        Feb 3, 2023, 5:41:08 PM2/3/23
        to Samuel Rawlins, rev...@dartlang.org, Brian Wilkerson

        Attention is currently required from: Brian Wilkerson, Danny Tuppeny, Samuel Rawlins.

        Phil Quitslund would like Samuel Rawlins to review this change.

        View Change

        linter 1.33.0 rc

        Some notes.

        * There are a number of tests that should get decoupled from the linter being pulled into `DEPS`. Instead of depending on the state of lints there, we should update the tests instead to use a more hermetic environment. (See for example `options_rule_validator_test.dart` for how that might look.)


        Downstream (blocking) fixes:

        * https://github.com/flutter/flutter/pull/119736
        * https://github.com/flutter/gallery/pull/878


        Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
        ---
        M CHANGELOG.md
        M DEPS
        M pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
        M pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
        M pkg/analysis_server/test/src/plugin/result_converter_test.dart
        M pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart
        M pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
        M pkg/analysis_server/test/stress/replay/replay.dart
        M pkg/analysis_server/tool/code_completion/relevance_metrics.dart
        M pkg/analyzer_utilities/analysis_options.yaml
        M pkg/test_runner/analysis_options.yaml
        11 files changed, 100 insertions(+), 48 deletions(-)

        index 2cc3378..6ef7b11 100644

        --- a/DEPS
        +++ b/DEPS
        @@ -145,7 +145,7 @@
        "http_parser_rev": "6f73e4a399df013ded8f4c81f151d122b36d361b",
        "intl_rev": "946c34c155073c0c7dbbc6ce06f5d0c35570019d",
        "json_rpc_2_rev": "e73c4ad2f7b5cbf083569f00ac7fe6d7151afe22",
        - "linter_rev": "8f7b75f8a3501ca2c4d5bbc1f003d90d66447544", # 1.32.0
        +  "linter_rev": "70fb087e39e6882ad331ee1e3f52f3f3a88e2d16", # 1.33.0 (+ `unnecessary_parenthesis` fix)
        diff --git a/pkg/analysis_server/test/src/plugin/result_converter_test.dart b/pkg/analysis_server/test/src/plugin/result_converter_test.dart
        index 220ca9a..4abd37f 100644
        --- a/pkg/analysis_server/test/src/plugin/result_converter_test.dart
        +++ b/pkg/analysis_server/test/src/plugin/result_converter_test.dart
        @@ -19,23 +19,6 @@

        @reflectiveTest
        class ResultConverterTest extends ProtocolTestUtilities {
        - static const List<String> strings = <String>[
        - 'a',
        - 'b',
        - 'c',
        - 'd',
        - 'e',
        - 'f',
        - 'g',
        - 'h',
        - 'i',
        - 'j',
        - 'k',
        - 'l',
        - 'm',
        - 'n'
        - ];
        -
        ResultConverter converter = ResultConverter();

        void test_convertAnalysisErrorFixes() {
        diff --git a/pkg/analysis_server/test/stress/replay/replay.dart b/pkg/analysis_server/test/stress/replay/replay.dart
        index 8988b18..0b65f36 100644
        --- a/pkg/analysis_server/test/stress/replay/replay.dart
        +++ b/pkg/analysis_server/test/stress/replay/replay.dart
        @@ -50,6 +50,7 @@
        static String OVERLAY_STYLE_OPTION_NAME = 'overlay-style';

        /// The name of the branch used to clean-up after making temporary changes.
        + // ignore: unreachable_from_main
        static const String TEMP_BRANCH_NAME = 'temp';

        /// The name of the command-line flag that will cause verbose output to be
        diff --git a/pkg/analysis_server/tool/code_completion/relevance_metrics.dart b/pkg/analysis_server/tool/code_completion/relevance_metrics.dart
        index 254802d..0c00310 100644
        --- a/pkg/analysis_server/tool/code_completion/relevance_metrics.dart
        +++ b/pkg/analysis_server/tool/code_completion/relevance_metrics.dart
        @@ -116,6 +116,7 @@
        /// A number identifying the version of this code that produced a given JSON
        /// encoded file. The number should be incremented whenever the shape of the
        /// JSON file is changed.
        + // ignore: unreachable_from_main
        static const String currentVersion = '1';

        /// A table mapping match distances to counts by kind of distance.

        diff --git a/pkg/analyzer_utilities/analysis_options.yaml b/pkg/analyzer_utilities/analysis_options.yaml
        index 3596ce5..712121e 100644
        --- a/pkg/analyzer_utilities/analysis_options.yaml
        +++ b/pkg/analyzer_utilities/analysis_options.yaml
        @@ -12,7 +12,6 @@
        # Enable when we require Dart 2.19.0.
        #- dangling_library_doc_comments
        - depend_on_referenced_packages
        - - enable_null_safety
        - implicit_call_tearoffs
        - library_annotations
        - unawaited_futures
        diff --git a/pkg/test_runner/analysis_options.yaml b/pkg/test_runner/analysis_options.yaml
        index 3f45629..bd9e22a 100644
        --- a/pkg/test_runner/analysis_options.yaml
        +++ b/pkg/test_runner/analysis_options.yaml
        @@ -7,7 +7,6 @@
        linter:
        rules:
        avoid_bool_literals_in_conditional_expressions: true
        - avoid_returning_null: true
        avoid_unused_constructor_parameters: true
        cancel_subscriptions: true
        comment_references: true

        To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
        Gerrit-Change-Number: 280054
        Gerrit-PatchSet: 14
        Gerrit-Owner: Phil Quitslund <pquit...@google.com>
        Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
        Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
        Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
        Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
        Gerrit-CC: Oleh Prypin <opr...@google.com>
        Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
        Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>

        CBuild (Gerrit)

        unread,
        Feb 3, 2023, 6:14:22 PM2/3/23
        to Phil Quitslund, rev...@dartlang.org, Samuel Rawlins, Brian Wilkerson, Commit Queue, Danny Tuppeny, Oleh Prypin

        Attention is currently required from: Brian Wilkerson, Danny Tuppeny, Samuel Rawlins.

        go/dart-cbuild result: SUCCESS

        Details: https://goto.google.com/dart-cbuild/find/1e129ff662b0353ca9319bdf0ea72bc93d0ebc5e

        View Change

          To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
          Gerrit-Change-Number: 280054
          Gerrit-PatchSet: 14
          Gerrit-Owner: Phil Quitslund <pquit...@google.com>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
          Gerrit-CC: Oleh Prypin <opr...@google.com>
          Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
          Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Comment-Date: Fri, 03 Feb 2023 23:14:17 +0000

          Brian Wilkerson (Gerrit)

          unread,
          Feb 3, 2023, 6:21:12 PM2/3/23
          to Phil Quitslund, rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue, Danny Tuppeny, Oleh Prypin

          Attention is currently required from: Danny Tuppeny, Phil Quitslund, Samuel Rawlins.

          Patch set 14:Code-Review +1

          View Change

          1 comment:

          • File pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml:

            • Patch Set #14, Line 2023: needsEvaluation

              This should have a fix that removes the break statement. We can update it later, or as part of this CL.

          To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
          Gerrit-Change-Number: 280054
          Gerrit-PatchSet: 14
          Gerrit-Owner: Phil Quitslund <pquit...@google.com>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
          Gerrit-CC: Oleh Prypin <opr...@google.com>
          Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
          Gerrit-Attention: Phil Quitslund <pquit...@google.com>
          Gerrit-Comment-Date: Fri, 03 Feb 2023 23:21:04 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Gerrit-MessageType: comment

          Phil Quitslund (Gerrit)

          unread,
          Feb 6, 2023, 1:13:12 PM2/6/23
          to rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue, Danny Tuppeny, Oleh Prypin

          Attention is currently required from: Danny Tuppeny, Samuel Rawlins.

          View Change

          1 comment:

          • File pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml:

            • This should have a fix that removes the break statement. […]

              Totally, yes. Updated status. Thanks!

          To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
          Gerrit-Change-Number: 280054
          Gerrit-PatchSet: 15
          Gerrit-Owner: Phil Quitslund <pquit...@google.com>
          Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
          Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
          Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
          Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
          Gerrit-CC: Oleh Prypin <opr...@google.com>
          Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
          Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
          Gerrit-Comment-Date: Mon, 06 Feb 2023 18:13:07 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
          Gerrit-MessageType: comment

          CBuild (Gerrit)

          unread,
          Feb 6, 2023, 1:41:57 PM2/6/23
          to Phil Quitslund, rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, Commit Queue, Danny Tuppeny, Oleh Prypin

          Attention is currently required from: Danny Tuppeny, Samuel Rawlins.

          go/dart-cbuild result: SUCCESS

          Details: https://goto.google.com/dart-cbuild/find/3eb7c2a63f9dfb01c0797fb0df3761521081053c

          View Change

            To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
            Gerrit-Change-Number: 280054
            Gerrit-PatchSet: 15
            Gerrit-Owner: Phil Quitslund <pquit...@google.com>
            Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
            Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
            Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
            Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
            Gerrit-CC: Oleh Prypin <opr...@google.com>
            Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
            Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
            Gerrit-Comment-Date: Mon, 06 Feb 2023 18:41:53 +0000

            CBuild (Gerrit)

            unread,
            Feb 7, 2023, 12:47:25 PM2/7/23
            to Phil Quitslund, rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, Commit Queue, Danny Tuppeny, Oleh Prypin

            Attention is currently required from: Danny Tuppeny, Phil Quitslund, Samuel Rawlins.

            go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)

            Details: https://goto.google.com/dart-cbuild/find/10b7a3b3c912274ecc215562579b1507d3fed38b

            View Change

              To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
              Gerrit-Change-Number: 280054
              Gerrit-PatchSet: 16
              Gerrit-Owner: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
              Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
              Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-CC: Oleh Prypin <opr...@google.com>
              Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
              Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-Attention: Phil Quitslund <pquit...@google.com>
              Gerrit-Comment-Date: Tue, 07 Feb 2023 17:47:19 +0000

              Phil Quitslund (Gerrit)

              unread,
              Feb 7, 2023, 2:23:52 PM2/7/23
              to rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue, Danny Tuppeny, Oleh Prypin

              Attention is currently required from: Danny Tuppeny, Samuel Rawlins.

              View Change

              2 comments:

              To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
              Gerrit-Change-Number: 280054
              Gerrit-PatchSet: 16
              Gerrit-Owner: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
              Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
              Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-CC: Oleh Prypin <opr...@google.com>
              Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
              Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-Comment-Date: Tue, 07 Feb 2023 19:23:47 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Gerrit-MessageType: comment

              Phil Quitslund (Gerrit)

              unread,
              Feb 7, 2023, 2:25:10 PM2/7/23
              to Paul Berry, rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins

              Attention is currently required from: Danny Tuppeny, Paul Berry, Samuel Rawlins.

              Phil Quitslund would like Paul Berry to review this change.

              View Change

              linter 1.33.0 rc

              Some notes.

              * There are a number of tests that should get decoupled from the linter being pulled into `DEPS`. Instead of depending on the state of lints there, we should update the tests instead to use a more hermetic environment. (See for example `options_rule_validator_test.dart` for how that might look.)


              Downstream (blocking) fixes:

              * https://github.com/flutter/flutter/pull/119736
              * https://github.com/flutter/gallery/pull/878


              Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
              ---
              M CHANGELOG.md
              M DEPS
              M pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
              M pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
              M pkg/analysis_server/test/src/plugin/result_converter_test.dart
              M pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart
              M pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
              M pkg/analysis_server/test/stress/replay/replay.dart
              M pkg/analysis_server/tool/code_completion/relevance_metrics.dart
              M pkg/analyzer_utilities/analysis_options.yaml
              M pkg/test_runner/analysis_options.yaml
              11 files changed, 102 insertions(+), 48 deletions(-)

              diff --git a/CHANGELOG.md b/CHANGELOG.md
              index 36c6a1e..77efdbe 100644
              index 1beb8e8..3248dce 100644
              --- a/DEPS
              +++ b/DEPS
              @@ -146,7 +146,7 @@
              "http_parser_rev": "1c0c17a1a5d9ca62c85f0940d9edbf2a98209bfa",
              "intl_rev": "fca552f2ec5d682b5fa36f02bdd72a5a4e2edcee",
              "json_rpc_2_rev": "0280ac6cb4f3905d81c47ba927123ba2b95f7940",

              - "linter_rev": "8f7b75f8a3501ca2c4d5bbc1f003d90d66447544", # 1.32.0
              + "linter_rev": "70fb087e39e6882ad331ee1e3f52f3f3a88e2d16", # 1.33.0 (+ `unnecessary_parenthesis` fix)
              "lints_rev": "dfded5e265015f21ce154577fe8488dc244e33c2",
                 "logging_rev": "abef3717d958158eb8b0ddb2871f4b15a9804cd4",

              "markdown_rev": "ee3f4e976efcfed87c6ec78364bc2dd3c6e717b9", # https://github.com/dart-lang/markdown/pull/494
              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 aaa22e6..51f682f 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
              @@ -1996,6 +1996,10 @@

              status: needsEvaluation
              LintCode.unnecessary_brace_in_string_interps:
              status: hasFix
              +LintCode.unnecessary_breaks:
              +  status: needsFix
              + notes: |-
              + https://github.com/dart-lang/sdk/issues/49960

              To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
              Gerrit-Change-Number: 280054
              Gerrit-PatchSet: 16
              Gerrit-Owner: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
              Gerrit-Reviewer: Paul Berry <paul...@google.com>
              Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
              Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-CC: Oleh Prypin <opr...@google.com>
              Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
              Gerrit-Attention: Paul Berry <paul...@google.com>
              Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-MessageType: newchange

              Phil Quitslund (Gerrit)

              unread,
              Feb 7, 2023, 2:27:14 PM2/7/23
              to rev...@dartlang.org, Paul Berry, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue, Danny Tuppeny, Oleh Prypin

              Attention is currently required from: Danny Tuppeny, Paul Berry, Samuel Rawlins.

              View Change

              2 comments:

              • Patchset:

              • File pkg/test_runner/analysis_options.yaml:

              To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
              Gerrit-Change-Number: 280054
              Gerrit-PatchSet: 16
              Gerrit-Owner: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
              Gerrit-Reviewer: Paul Berry <paul...@google.com>
              Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
              Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-CC: Oleh Prypin <opr...@google.com>
              Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
              Gerrit-Attention: Paul Berry <paul...@google.com>
              Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-Comment-Date: Tue, 07 Feb 2023 19:27:07 +0000

              Paul Berry (Gerrit)

              unread,
              Feb 7, 2023, 3:19:05 PM2/7/23
              to Phil Quitslund, rev...@dartlang.org, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue, Danny Tuppeny, Oleh Prypin

              Attention is currently required from: Danny Tuppeny, Phil Quitslund, Samuel Rawlins.

              Patch set 16:Code-Review +1

              View Change

              1 comment:

              To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
              Gerrit-Change-Number: 280054
              Gerrit-PatchSet: 16
              Gerrit-Owner: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
              Gerrit-Reviewer: Paul Berry <paul...@google.com>
              Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
              Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
              Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-CC: Oleh Prypin <opr...@google.com>
              Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
              Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
              Gerrit-Attention: Phil Quitslund <pquit...@google.com>
              Gerrit-Comment-Date: Tue, 07 Feb 2023 20:18:59 +0000

              Phil Quitslund (Gerrit)

              unread,
              Feb 7, 2023, 3:56:26 PM2/7/23
              to rev...@dartlang.org, Paul Berry, Brian Wilkerson, Samuel Rawlins, CBuild, Commit Queue, Danny Tuppeny, Oleh Prypin

              Attention is currently required from: Danny Tuppeny, Phil Quitslund, Samuel Rawlins.

              Patch set 16:Commit-Queue +2

              View Change

                To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: sdk
                Gerrit-Branch: main
                Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
                Gerrit-Change-Number: 280054
                Gerrit-PatchSet: 16
                Gerrit-Owner: Phil Quitslund <pquit...@google.com>
                Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
                Gerrit-Reviewer: Paul Berry <paul...@google.com>
                Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
                Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
                Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
                Gerrit-CC: Oleh Prypin <opr...@google.com>
                Gerrit-Attention: Samuel Rawlins <sraw...@google.com>
                Gerrit-Attention: Danny Tuppeny <da...@tuppeny.com>
                Gerrit-Attention: Phil Quitslund <pquit...@google.com>
                Gerrit-Comment-Date: Tue, 07 Feb 2023 20:56:20 +0000
                Gerrit-HasComments: No
                Gerrit-Has-Labels: Yes
                Gerrit-MessageType: comment

                Commit Queue (Gerrit)

                unread,
                Feb 7, 2023, 3:56:40 PM2/7/23
                to Phil Quitslund, rev...@dartlang.org, Paul Berry, Brian Wilkerson, Samuel Rawlins, CBuild, Danny Tuppeny, Oleh Prypin

                Commit Queue submitted this change.

                View Change

                Approvals: Brian Wilkerson: Looks good to me, approved Phil Quitslund: Commit Paul Berry: Looks good to me, approved
                linter 1.33.0 rc

                Some notes.

                * There are a number of tests that should get decoupled from the linter being pulled into `DEPS`. Instead of depending on the state of lints there, we should update the tests instead to use a more hermetic environment. (See for example `options_rule_validator_test.dart` for how that might look.)


                Downstream (blocking) fixes:

                * https://github.com/flutter/flutter/pull/119736
                * https://github.com/flutter/gallery/pull/878


                Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
                Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280054
                Reviewed-by: Brian Wilkerson <brianwi...@google.com>
                Commit-Queue: Phil Quitslund <pquit...@google.com>
                Reviewed-by: Paul Berry <paul...@google.com>

                ---
                M CHANGELOG.md
                M DEPS
                M pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
                M pkg/analysis_server/test/lsp/code_actions_fixes_test.dart
                M pkg/analysis_server/test/src/plugin/result_converter_test.dart
                M pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_lint_test.dart
                M pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
                M pkg/analysis_server/test/stress/replay/replay.dart
                M pkg/analysis_server/tool/code_completion/relevance_metrics.dart
                M pkg/analyzer_utilities/analysis_options.yaml
                M pkg/test_runner/analysis_options.yaml
                11 files changed, 106 insertions(+), 48 deletions(-)

                index f8ac44f..dc9320e 100644

                To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: sdk
                Gerrit-Branch: main
                Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
                Gerrit-Change-Number: 280054
                Gerrit-PatchSet: 17
                Gerrit-Owner: Phil Quitslund <pquit...@google.com>
                Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
                Gerrit-Reviewer: Paul Berry <paul...@google.com>
                Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
                Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
                Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
                Gerrit-CC: Oleh Prypin <opr...@google.com>
                Gerrit-MessageType: merged

                CBuild (Gerrit)

                unread,
                Feb 7, 2023, 4:28:22 PM2/7/23
                to Commit Queue, Phil Quitslund, rev...@dartlang.org, Paul Berry, Brian Wilkerson, Samuel Rawlins, Danny Tuppeny, Oleh Prypin

                go/dart-cbuild result: SUCCESS

                Details: https://goto.google.com/dart-cbuild/find/ad2da86f18c06ab348f748ad2354ebb5e577f52c

                View Change

                  To view, visit change 280054. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: I5671b0abde3eeda75513abaaf9fef3bcd5115f9b
                  Gerrit-Change-Number: 280054
                  Gerrit-PatchSet: 17
                  Gerrit-Owner: Phil Quitslund <pquit...@google.com>
                  Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
                  Gerrit-Reviewer: Paul Berry <paul...@google.com>
                  Gerrit-Reviewer: Phil Quitslund <pquit...@google.com>
                  Gerrit-Reviewer: Samuel Rawlins <sraw...@google.com>
                  Gerrit-CC: Danny Tuppeny <da...@tuppeny.com>
                  Gerrit-CC: Oleh Prypin <opr...@google.com>
                  Gerrit-Comment-Date: Tue, 07 Feb 2023 21:28:18 +0000
                  Reply all
                  Reply to author
                  Forward
                  0 new messages