diff --git a/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart b/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart index 4be7bf85337..2125b310b32 100644 --- a/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart +++ b/packages/devtools_app/benchmark/test_infra/automators/devtools_automator.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. -// ignore_for_file: invalid_use_of_visible_for_testing_member, valid use for benchmark tests. - import 'dart:async'; import 'package:devtools_app/devtools_app.dart'; diff --git a/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart b/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart index 0269f4a5eb5..43baef74519 100644 --- a/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart +++ b/packages/devtools_app/integration_test/test/live_connection/eval_and_inspect_test.dart @@ -5,8 +5,6 @@ // Do not delete these arguments. They are parsed by test runner. // test-argument:appPath="test/test_infra/fixtures/memory_app" -// ignore_for_file: avoid_print - import 'package:devtools_test/helpers.dart'; import 'package:devtools_test/integration_test.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart b/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart index cc0d0b5a173..ef586a29f74 100644 --- a/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart +++ b/packages/devtools_app/integration_test/test_infra/run/_test_app_driver.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. -// ignore_for_file: avoid_print - import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/packages/devtools_app/integration_test/test_infra/run/run_test.dart b/packages/devtools_app/integration_test/test_infra/run/run_test.dart index 5d4689ca85e..ec1f6b9ae22 100644 --- a/packages/devtools_app/integration_test/test_infra/run/run_test.dart +++ b/packages/devtools_app/integration_test/test_infra/run/run_test.dart @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. -// ignore_for_file: avoid_print - import 'dart:async'; import 'dart:convert'; diff --git a/packages/devtools_app/lib/src/screens/debugger/variables.dart b/packages/devtools_app/lib/src/screens/debugger/variables.dart index 6e59acb0bf4..7460bad14da 100644 --- a/packages/devtools_app/lib/src/screens/debugger/variables.dart +++ b/packages/devtools_app/lib/src/screens/debugger/variables.dart @@ -4,7 +4,6 @@ // TODO(https://github.com/flutter/devtools/issues/4717): migrate away from // deprecated members. -// ignore_for_file: deprecated_member_use import 'dart:async'; diff --git a/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart b/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart index 870c4bcf896..bb3b2cee614 100644 --- a/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart +++ b/packages/devtools_app/lib/src/screens/performance/panes/controls/enhance_tracing/enhance_tracing_controller.dart @@ -62,8 +62,6 @@ class EnhanceTracingController extends DisposableController _firstLiveFrameId == null) { _firstLiveFrameId = FlutterFrame.fromJson(event.extensionData!.data).id; - // See https://github.com/dart-lang/linter/issues/3801 - // ignore: discarded_futures unawaited(_firstFrameEventSubscription!.cancel()); _firstFrameEventSubscription = null; } @@ -120,8 +118,6 @@ class EnhanceTracingController extends DisposableController @override void dispose() { unawaited(showMenuStreamController.close()); - // See https://github.com/dart-lang/linter/issues/3801 - // ignore: discarded_futures unawaited(_firstFrameEventSubscription?.cancel()); super.dispose(); } diff --git a/packages/devtools_app/lib/src/shared/charts/chart_controller.dart b/packages/devtools_app/lib/src/shared/charts/chart_controller.dart index 3a4c4af7b94..d03ddb20d11 100644 --- a/packages/devtools_app/lib/src/shared/charts/chart_controller.dart +++ b/packages/devtools_app/lib/src/shared/charts/chart_controller.dart @@ -220,10 +220,9 @@ class ChartController extends DisposableController // Greater or equal to range we're zooming in on? if (lastDT.difference(firstDT).inMinutes >= duration.inMinutes) { // Grab the duration in minutes passed in. - final startOfLastNMinutes = - // We need this cast to be able to return null if nothing is found. - // ignore: unnecessary_cast - timestamps.reversed.firstWhereOrNull((timestamp) { + final startOfLastNMinutes = timestamps.reversed.firstWhereOrNull(( + timestamp, + ) { final currentDT = DateTime.fromMillisecondsSinceEpoch(timestamp); final diff = lastDT.difference(currentDT); if (diff.inMinutes >= duration.inMinutes) { diff --git a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart index 01e5e2c7657..26644238b5f 100644 --- a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart +++ b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_default.dart @@ -16,9 +16,6 @@ Future allowedError(Future future, {bool logError = true}) { _log.shout('[${error.runtimeType}] ${errorLines.first}'); _log.shout(errorLines.skip(1).join('\n')); } - // TODO(srawlins): This is an illegal return value (`null`) for all `T`. - // This function must return an actual `T`. - // ignore: null_argument_to_non_null_type return Future.value(); }); } diff --git a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart index 1f90746ada4..66cc1e6cafd 100644 --- a/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart +++ b/packages/devtools_app/lib/src/shared/config_specific/logger/_allowed_error_web.dart @@ -17,9 +17,6 @@ Future allowedError(Future future, {bool logError = true}) { console.log(errorLines.skip(1).join('\n').toJS); console.groupEnd(); } - // TODO(srawlins): This is an illegal return value (`null`) for all `T`. - // This function must return an actual `T`. - // ignore: null_argument_to_non_null_type return Future.value(); }); } diff --git a/packages/devtools_app/lib/src/shared/framework/screen.dart b/packages/devtools_app/lib/src/shared/framework/screen.dart index 08aaebd9378..bdab02fe731 100644 --- a/packages/devtools_app/lib/src/shared/framework/screen.dart +++ b/packages/devtools_app/lib/src/shared/framework/screen.dart @@ -56,10 +56,8 @@ enum ScreenMetaData { title: 'Memory', iconAsset: 'icons/app_bar/memory.png', requiresDartVm: true, - // ignore: avoid_redundant_argument_values, false positive requiresConnection: !FeatureFlags.memoryDisconnectExperience, tutorialVideoTimestamp: '?t=420', - // ignore: avoid_redundant_argument_values, false positive worksWithOfflineData: FeatureFlags.memoryDisconnectExperience, ), debugger( diff --git a/packages/devtools_app/lib/src/shared/http/_http_cookies.dart b/packages/devtools_app/lib/src/shared/http/_http_cookies.dart index ff3922c7948..ca49ed825c7 100644 --- a/packages/devtools_app/lib/src/shared/http/_http_cookies.dart +++ b/packages/devtools_app/lib/src/shared/http/_http_cookies.dart @@ -6,21 +6,14 @@ // https://github.com/dart-lang/sdk/blob/main/sdk/lib/_http/http_headers.dart#L965 // TODO(mossman): Is there a way to use dart:io directly? -// ignore_for_file: annotate_overrides -// ignore_for_file: empty_statements -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: prefer_const_declarations // ignore_for_file: prefer_contains // ignore_for_file: prefer_final_locals // ignore_for_file: prefer_is_empty // ignore_for_file: prefer_single_quotes -// ignore_for_file: slash_for_doc_comments // ignore_for_file: sort_constructors_first // ignore_for_file: unnecessary_const // ignore_for_file: unnecessary_new -// ignore_for_file: unused_catch_clause // ignore_for_file: unused_element -// ignore_for_file: unused_local_variable part of 'http.dart'; diff --git a/packages/devtools_app/lib/src/shared/http/_http_date.dart b/packages/devtools_app/lib/src/shared/http/_http_date.dart index e5e3cb36f76..863eff93507 100644 --- a/packages/devtools_app/lib/src/shared/http/_http_date.dart +++ b/packages/devtools_app/lib/src/shared/http/_http_date.dart @@ -5,16 +5,11 @@ // This file was pulled from dart:io. // ignore_for_file: empty_statements -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: prefer_const_declarations // ignore_for_file: prefer_final_locals // ignore_for_file: prefer_is_empty // ignore_for_file: prefer_single_quotes -// ignore_for_file: slash_for_doc_comments // ignore_for_file: unnecessary_const // ignore_for_file: unnecessary_new -// ignore_for_file: unused_catch_clause -// ignore_for_file: unused_local_variable // ignore_for_file: avoid-throw-in-catch-block part of 'http.dart'; diff --git a/packages/devtools_app/lib/src/shared/ui/hover.dart b/packages/devtools_app/lib/src/shared/ui/hover.dart index f51078aa5a6..7ca42af282d 100644 --- a/packages/devtools_app/lib/src/shared/ui/hover.dart +++ b/packages/devtools_app/lib/src/shared/ui/hover.dart @@ -448,7 +448,6 @@ class _HoverCardTooltipState extends State { // If we get no data back, then don't show a hover card. if (data == null) return; // Otherwise, show a hover card immediately. - // ignore: use_build_context_synchronously, requires investigation return _setHoverCardFromData( data, // ignore: use_build_context_synchronously, requires investigation @@ -459,7 +458,6 @@ class _HoverCardTooltipState extends State { } // The data on the card is fetched asynchronously, so show a spinner // while we wait for it. - // ignore: use_build_context_synchronously, requires investigation spinnerHoverCard = HoverCard.fromHoverEvent( // ignore: use_build_context_synchronously, requires investigation context: context, @@ -485,7 +483,6 @@ class _HoverCardTooltipState extends State { return; } - // ignore: use_build_context_synchronously, requires investigation return _setHoverCardFromData( hoverCardData, // ignore: use_build_context_synchronously, requires investigation diff --git a/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart b/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart index c17b49b04e3..cd774680642 100644 --- a/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart +++ b/packages/devtools_app/test/test_infra/fixtures/flutter_app/lib/main.dart @@ -9,8 +9,6 @@ // (the test verifies that breakpoints are hit at specific lines). import 'package:flutter/material.dart'; -// Unused imports are useful for testing autocomplete. -// ignore_for_file: unused_import import 'src/autocomplete.dart'; import 'src/other_classes.dart'; diff --git a/packages/devtools_app/test/test_infra/flutter_test_environment.dart b/packages/devtools_app/test/test_infra/flutter_test_environment.dart index 622786ecae7..54da10aa78d 100644 --- a/packages/devtools_app/test/test_infra/flutter_test_environment.dart +++ b/packages/devtools_app/test/test_infra/flutter_test_environment.dart @@ -161,7 +161,6 @@ class FlutterTestEnvironment { setGlobal(DTDManager, DTDManager()); // Clear out VM service calls from the test driver. - // ignore: invalid_use_of_visible_for_testing_member _service.clearVmServiceCalls(); await serviceConnection.serviceManager.vmServiceOpened( diff --git a/packages/devtools_app_shared/lib/src/utils/list.dart b/packages/devtools_app_shared/lib/src/utils/list.dart index 22775e50643..d4dc274d017 100644 --- a/packages/devtools_app_shared/lib/src/utils/list.dart +++ b/packages/devtools_app_shared/lib/src/utils/list.dart @@ -27,7 +27,6 @@ final class ListValueNotifier extends ChangeNotifier @override // This override is needed to change visibility of the method. - // ignore: unnecessary_overrides void notifyListeners() { super.notifyListeners(); } diff --git a/packages/devtools_extensions/lib/src/template/extension_manager.dart b/packages/devtools_extensions/lib/src/template/extension_manager.dart index 446c68a19e6..89ea1ead915 100644 --- a/packages/devtools_extensions/lib/src/template/extension_manager.dart +++ b/packages/devtools_extensions/lib/src/template/extension_manager.dart @@ -44,7 +44,6 @@ class ExtensionManager { /// removed in [dispose]. EventListener? _handleMessageListener; - // ignore: unused_element, false positive due to part files Future _init() async { window.addEventListener( 'message', @@ -76,7 +75,6 @@ class ExtensionManager { } } - // ignore: unused_element, false positive due to part files void _dispose() { _registeredEventHandlers.clear(); window.removeEventListener('message', _handleMessageListener); diff --git a/packages/devtools_shared/lib/src/server/server_api.dart b/packages/devtools_shared/lib/src/server/server_api.dart index 6eb1f435093..8a39deb8cd2 100644 --- a/packages/devtools_shared/lib/src/server/server_api.dart +++ b/packages/devtools_shared/lib/src/server/server_api.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd. -// ignore_for_file: avoid_classes_with_only_static_members, avoid_print +// ignore_for_file: avoid_print import 'dart:async'; import 'dart:convert'; diff --git a/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart b/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart index 9d20bb4abaa..3a5f6025eeb 100644 --- a/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart +++ b/packages/devtools_test/lib/src/integration_test/integration_test_utils.dart @@ -25,7 +25,6 @@ Future resetHistory() async { // the web-specific implementation of the Flutter Engine, at // `lib/web_ui/lib/src/engine/window.dart` in the Flutter engine // repository. - // ignore: avoid_dynamic_calls .resetHistory(); } diff --git a/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart b/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart index 3a6d35971f0..5be3b19956a 100644 --- a/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart +++ b/packages/devtools_test/lib/src/mocks/fake_service_extension_manager.dart @@ -12,7 +12,6 @@ import 'package:devtools_app_shared/src/service/service_extension_manager.dart'; import 'package:flutter/foundation.dart'; import 'package:mockito/mockito.dart'; -// ignore: subtype_of_sealed_class, fake for testing. /// Fake that simplifies writing UI tests that depend on the /// ServiceExtensionManager. // TODO(jacobr): refactor ServiceExtensionManager so this fake can reuse more diff --git a/packages/devtools_test/lib/src/mocks/mocks.dart b/packages/devtools_test/lib/src/mocks/mocks.dart index 0b505277c5c..82472391cb5 100644 --- a/packages/devtools_test/lib/src/mocks/mocks.dart +++ b/packages/devtools_test/lib/src/mocks/mocks.dart @@ -214,7 +214,6 @@ void mockFlutterVersion(ConnectedApp connectedApp, SemanticVersion version) { when(connectedApp.connectedAppInitialized).thenReturn(true); } -// ignore: prefer_single_quotes, false positive. final mockGrammar = Grammar.fromJson( jsonDecode(''' {