diff --git a/analysis_options.yaml b/analysis_options.yaml index efeef6268..3e557db88 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -10,7 +10,6 @@ analyzer: linter: rules: - always_declare_return_types - - always_require_non_null_named_parameters - annotate_overrides - avoid_classes_with_only_static_members - avoid_empty_else @@ -20,7 +19,6 @@ linter: - avoid_relative_lib_imports - avoid_renaming_method_parameters - avoid_return_types_on_setters - - avoid_returning_null - avoid_returning_null_for_void - avoid_returning_this - avoid_shadowing_type_parameters @@ -63,7 +61,6 @@ linter: - prefer_conditional_assignment - prefer_const_constructors - prefer_contains - - prefer_equal_for_default_values - prefer_final_fields - prefer_for_elements_to_map_fromIterable - prefer_function_declarations_over_variables diff --git a/dwds/debug_extension/web/background.dart b/dwds/debug_extension/web/background.dart index 5efd5307f..baea3dab4 100644 --- a/dwds/debug_extension/web/background.dart +++ b/dwds/debug_extension/web/background.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library background; +library; import 'package:dwds/data/debug_info.dart'; import 'package:js/js.dart'; diff --git a/dwds/debug_extension/web/cider_connection.dart b/dwds/debug_extension/web/cider_connection.dart index a47cb31a2..46760c0b4 100644 --- a/dwds/debug_extension/web/cider_connection.dart +++ b/dwds/debug_extension/web/cider_connection.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library cider_connection; +library; import 'dart:convert'; import 'dart:js_util'; diff --git a/dwds/debug_extension/web/copier.dart b/dwds/debug_extension/web/copier.dart index 87919d443..5289904c8 100644 --- a/dwds/debug_extension/web/copier.dart +++ b/dwds/debug_extension/web/copier.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library copier; +library; import 'dart:html'; diff --git a/dwds/debug_extension/web/cross_extension_communication.dart b/dwds/debug_extension/web/cross_extension_communication.dart index 6adf6d405..0f01de827 100644 --- a/dwds/debug_extension/web/cross_extension_communication.dart +++ b/dwds/debug_extension/web/cross_extension_communication.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library cross_extension_communication; +library; import 'package:js/js.dart'; diff --git a/dwds/debug_extension/web/debug_info.dart b/dwds/debug_extension/web/debug_info.dart index f9986515c..da671caa4 100644 --- a/dwds/debug_extension/web/debug_info.dart +++ b/dwds/debug_extension/web/debug_info.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library debug_info; +library; import 'dart:convert'; import 'dart:html'; diff --git a/dwds/debug_extension/web/debug_session.dart b/dwds/debug_extension/web/debug_session.dart index d7ffaf058..f0ca1c733 100644 --- a/dwds/debug_extension/web/debug_session.dart +++ b/dwds/debug_extension/web/debug_session.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library debug_session; +library; import 'dart:async'; import 'dart:convert'; diff --git a/dwds/debug_extension/web/detector.dart b/dwds/debug_extension/web/detector.dart index 25729b075..71016a7c0 100644 --- a/dwds/debug_extension/web/detector.dart +++ b/dwds/debug_extension/web/detector.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library detector; +library; import 'dart:convert'; import 'dart:html'; diff --git a/dwds/debug_extension/web/devtools.dart b/dwds/debug_extension/web/devtools.dart index 6c0422e5b..299b6e7a4 100644 --- a/dwds/debug_extension/web/devtools.dart +++ b/dwds/debug_extension/web/devtools.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library devtools; +library; import 'dart:html'; diff --git a/dwds/debug_extension/web/logger.dart b/dwds/debug_extension/web/logger.dart index 7f818cf81..b546d8b79 100644 --- a/dwds/debug_extension/web/logger.dart +++ b/dwds/debug_extension/web/logger.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library logger; +library; import 'package:js/js.dart'; diff --git a/dwds/debug_extension/web/messaging.dart b/dwds/debug_extension/web/messaging.dart index 25c3f611e..92e08293f 100644 --- a/dwds/debug_extension/web/messaging.dart +++ b/dwds/debug_extension/web/messaging.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library messaging; +library; import 'dart:async'; import 'dart:convert'; diff --git a/dwds/debug_extension/web/panel.dart b/dwds/debug_extension/web/panel.dart index 1931db650..54cdaf052 100644 --- a/dwds/debug_extension/web/panel.dart +++ b/dwds/debug_extension/web/panel.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library panel; +library; import 'dart:async'; import 'dart:convert'; diff --git a/dwds/debug_extension/web/popup.dart b/dwds/debug_extension/web/popup.dart index aee699ce0..fb40cc75a 100644 --- a/dwds/debug_extension/web/popup.dart +++ b/dwds/debug_extension/web/popup.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library popup; +library; import 'dart:async'; import 'dart:convert'; diff --git a/dwds/debug_extension/web/storage.dart b/dwds/debug_extension/web/storage.dart index 0b46cd4a9..2df7fa588 100644 --- a/dwds/debug_extension/web/storage.dart +++ b/dwds/debug_extension/web/storage.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library storage; +library; import 'dart:async'; import 'dart:convert'; diff --git a/dwds/debug_extension/web/utils.dart b/dwds/debug_extension/web/utils.dart index 4bcd64144..e86378731 100644 --- a/dwds/debug_extension/web/utils.dart +++ b/dwds/debug_extension/web/utils.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library utils; +library; import 'dart:async'; import 'dart:js_util'; diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 4c206a1ff..ec5e9d8ac 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -50,7 +50,7 @@ dev_dependencies: frontend_server_common: path: ../frontend_server_common js: ^0.6.4 - lints: ^3.0.0 + lints: ^4.0.0 pubspec_parse: ^1.2.0 puppeteer: ^3.0.0 stream_channel: ^2.1.0 diff --git a/dwds/test/build/ensure_version_test.dart b/dwds/test/build/ensure_version_test.dart index 6a802fe2b..ea98c70eb 100644 --- a/dwds/test/build/ensure_version_test.dart +++ b/dwds/test/build/ensure_version_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; + import 'dart:io'; import 'package:dwds/src/version.dart'; diff --git a/dwds/test/build/min_sdk_test.dart b/dwds/test/build/min_sdk_test.dart index d8727115d..d4af9ceed 100644 --- a/dwds/test/build/min_sdk_test.dart +++ b/dwds/test/build/min_sdk_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Skip('Intended to run in analyze stage on stable SDK only, see mono_pkg.yaml') +library; + import 'dart:io'; import 'package:pub_semver/pub_semver.dart'; diff --git a/dwds/test/build_daemon_breakpoint_test.dart b/dwds/test/build_daemon_breakpoint_test.dart index 16dbdbf2a..b00f0b915 100644 --- a/dwds/test/build_daemon_breakpoint_test.dart +++ b/dwds/test/build_daemon_breakpoint_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/build_daemon_callstack_test.dart b/dwds/test/build_daemon_callstack_test.dart index b8bac90d8..d6125c963 100644 --- a/dwds/test/build_daemon_callstack_test.dart +++ b/dwds/test/build_daemon_callstack_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; diff --git a/dwds/test/build_daemon_circular_evaluate_test.dart b/dwds/test/build_daemon_circular_evaluate_test.dart index 90c2d1794..941670ed4 100644 --- a/dwds/test/build_daemon_circular_evaluate_test.dart +++ b/dwds/test/build_daemon_circular_evaluate_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/build_daemon_evaluate_test.dart b/dwds/test/build_daemon_evaluate_test.dart index 45145c93c..a50810547 100644 --- a/dwds/test/build_daemon_evaluate_test.dart +++ b/dwds/test/build_daemon_evaluate_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/chrome_proxy_service_test.dart b/dwds/test/chrome_proxy_service_test.dart index 678c6d98d..68209be2e 100644 --- a/dwds/test/chrome_proxy_service_test.dart +++ b/dwds/test/chrome_proxy_service_test.dart @@ -5,6 +5,8 @@ @TestOn('vm') @Tags(['daily']) @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/dwds/test/dart_uri_file_uri_test.dart b/dwds/test/dart_uri_file_uri_test.dart index 4277dfd92..a84035c90 100644 --- a/dwds/test/dart_uri_file_uri_test.dart +++ b/dwds/test/dart_uri_file_uri_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/utilities/dart_uri.dart'; import 'package:path/path.dart' as p; diff --git a/dwds/test/dart_uri_test.dart b/dwds/test/dart_uri_test.dart index 74972b1c2..c0aade6c7 100644 --- a/dwds/test/dart_uri_test.dart +++ b/dwds/test/dart_uri_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/utilities/dart_uri.dart'; import 'package:path/path.dart' as p; diff --git a/dwds/test/debug_extension_test.dart b/dwds/test/debug_extension_test.dart index 002414481..6d87cc7c9 100644 --- a/dwds/test/debug_extension_test.dart +++ b/dwds/test/debug_extension_test.dart @@ -10,6 +10,7 @@ 'windows': Skip('https://github.com/dart-lang/webdev/issues/711'), 'linux': Skip('https://github.com/dart-lang/webdev/issues/2114'), }) +library; import 'package:dwds/src/connections/debug_connection.dart'; import 'package:dwds/src/handlers/injector.dart'; diff --git a/dwds/test/debug_service_test.dart b/dwds/test/debug_service_test.dart index ff2781056..ea3857341 100644 --- a/dwds/test/debug_service_test.dart +++ b/dwds/test/debug_service_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/dwds/test/debugger_test.dart b/dwds/test/debugger_test.dart index 112ee1c53..6ee625a9b 100644 --- a/dwds/test/debugger_test.dart +++ b/dwds/test/debugger_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'package:dwds/src/debugging/debugger.dart'; diff --git a/dwds/test/devtools_test.dart b/dwds/test/devtools_test.dart index def6e4497..f49e4c91e 100644 --- a/dwds/test/devtools_test.dart +++ b/dwds/test/devtools_test.dart @@ -4,6 +4,8 @@ @Timeout(Duration(minutes: 5)) @TestOn('vm') +library; + import 'dart:io'; import 'package:test/test.dart'; diff --git a/dwds/test/evaluate_circular_common.dart b/dwds/test/evaluate_circular_common.dart index 4ddb16bc3..b64b6ba14 100644 --- a/dwds/test/evaluate_circular_common.dart +++ b/dwds/test/evaluate_circular_common.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; diff --git a/dwds/test/evaluate_common.dart b/dwds/test/evaluate_common.dart index 67ca4e947..6fea4578e 100644 --- a/dwds/test/evaluate_common.dart +++ b/dwds/test/evaluate_common.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'package:dwds/src/services/expression_evaluator.dart'; diff --git a/dwds/test/events_test.dart b/dwds/test/events_test.dart index 3ce3fdd5c..9baa0c50e 100644 --- a/dwds/test/events_test.dart +++ b/dwds/test/events_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'dart:io'; diff --git a/dwds/test/execution_context_test.dart b/dwds/test/execution_context_test.dart index 90d961d1b..a0a18210d 100644 --- a/dwds/test/execution_context_test.dart +++ b/dwds/test/execution_context_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'dart:convert'; diff --git a/dwds/test/expression_compiler_service_test.dart b/dwds/test/expression_compiler_service_test.dart index 0531764b7..183813a9f 100644 --- a/dwds/test/expression_compiler_service_test.dart +++ b/dwds/test/expression_compiler_service_test.dart @@ -5,6 +5,8 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/dwds/test/expression_evaluator_test.dart b/dwds/test/expression_evaluator_test.dart index a4a336d0a..4405a891d 100644 --- a/dwds/test/expression_evaluator_test.dart +++ b/dwds/test/expression_evaluator_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'package:dwds/src/debugging/debugger.dart'; diff --git a/dwds/test/extension_backend_test.dart b/dwds/test/extension_backend_test.dart index 312f70f65..fd869021b 100644 --- a/dwds/test/extension_backend_test.dart +++ b/dwds/test/extension_backend_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'package:async/src/stream_queue.dart'; diff --git a/dwds/test/extension_debugger_test.dart b/dwds/test/extension_debugger_test.dart index d19d7a4cb..8d2b7c6ab 100644 --- a/dwds/test/extension_debugger_test.dart +++ b/dwds/test/extension_debugger_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'dart:convert'; diff --git a/dwds/test/frontend_server_breakpoint_test.dart b/dwds/test/frontend_server_breakpoint_test.dart index 02ca5bcf5..1d6be4ba2 100644 --- a/dwds/test/frontend_server_breakpoint_test.dart +++ b/dwds/test/frontend_server_breakpoint_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; diff --git a/dwds/test/frontend_server_callstack_test.dart b/dwds/test/frontend_server_callstack_test.dart index ff78fc066..03429b55c 100644 --- a/dwds/test/frontend_server_callstack_test.dart +++ b/dwds/test/frontend_server_callstack_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; diff --git a/dwds/test/frontend_server_circular_evaluate_test.dart b/dwds/test/frontend_server_circular_evaluate_test.dart index 2795a627c..1f6bb5815 100644 --- a/dwds/test/frontend_server_circular_evaluate_test.dart +++ b/dwds/test/frontend_server_circular_evaluate_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'dart:io'; diff --git a/dwds/test/frontend_server_ddc_evaluate_test.dart b/dwds/test/frontend_server_ddc_evaluate_test.dart index 04077d0f5..f2358ff9c 100644 --- a/dwds/test/frontend_server_ddc_evaluate_test.dart +++ b/dwds/test/frontend_server_ddc_evaluate_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 5)) +library; import 'dart:io'; diff --git a/dwds/test/frontend_server_evaluate_test.dart b/dwds/test/frontend_server_evaluate_test.dart index ed46b0a5f..f0ccd4c91 100644 --- a/dwds/test/frontend_server_evaluate_test.dart +++ b/dwds/test/frontend_server_evaluate_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 5)) +library; import 'dart:io'; diff --git a/dwds/test/handlers/asset_handler_test.dart b/dwds/test/handlers/asset_handler_test.dart index 471070cf3..acde9797a 100644 --- a/dwds/test/handlers/asset_handler_test.dart +++ b/dwds/test/handlers/asset_handler_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:shelf/shelf.dart'; import 'package:test/test.dart'; diff --git a/dwds/test/handlers/injector_test.dart b/dwds/test/handlers/injector_test.dart index 41cec573c..cb59c898b 100644 --- a/dwds/test/handlers/injector_test.dart +++ b/dwds/test/handlers/injector_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'dart:io'; diff --git a/dwds/test/inspector_test.dart b/dwds/test/inspector_test.dart index ea53ce63f..34e956473 100644 --- a/dwds/test/inspector_test.dart +++ b/dwds/test/inspector_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/dwds.dart'; import 'package:dwds/src/config/tool_configuration.dart'; diff --git a/dwds/test/instances/class_inspection_test.dart b/dwds/test/instances/class_inspection_test.dart index e9bf34092..3ce756629 100644 --- a/dwds/test/instances/class_inspection_test.dart +++ b/dwds/test/instances/class_inspection_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; diff --git a/dwds/test/instances/instance_canary_test.dart b/dwds/test/instances/instance_canary_test.dart index 22944e911..3db9d406a 100644 --- a/dwds/test/instances/instance_canary_test.dart +++ b/dwds/test/instances/instance_canary_test.dart @@ -4,6 +4,7 @@ @Tags(['daily']) @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/instance_inspection_canary_test.dart b/dwds/test/instances/instance_inspection_canary_test.dart index 68e4028be..453213945 100644 --- a/dwds/test/instances/instance_inspection_canary_test.dart +++ b/dwds/test/instances/instance_inspection_canary_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/instance_inspection_test.dart b/dwds/test/instances/instance_inspection_test.dart index 3c879b9bf..4ed4f4909 100644 --- a/dwds/test/instances/instance_inspection_test.dart +++ b/dwds/test/instances/instance_inspection_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/instance_test.dart b/dwds/test/instances/instance_test.dart index be95dd443..5528eaae3 100644 --- a/dwds/test/instances/instance_test.dart +++ b/dwds/test/instances/instance_test.dart @@ -4,6 +4,7 @@ @Tags(['daily']) @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/patterns_inspection_canary_test.dart b/dwds/test/instances/patterns_inspection_canary_test.dart index 30559bec8..81370df54 100644 --- a/dwds/test/instances/patterns_inspection_canary_test.dart +++ b/dwds/test/instances/patterns_inspection_canary_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/patterns_inspection_test.dart b/dwds/test/instances/patterns_inspection_test.dart index 1b6b7f2a7..864c871be 100644 --- a/dwds/test/instances/patterns_inspection_test.dart +++ b/dwds/test/instances/patterns_inspection_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/record_inspection_canary_test.dart b/dwds/test/instances/record_inspection_canary_test.dart index dc65290f7..91a49e55c 100644 --- a/dwds/test/instances/record_inspection_canary_test.dart +++ b/dwds/test/instances/record_inspection_canary_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/record_inspection_test.dart b/dwds/test/instances/record_inspection_test.dart index 0cc8ed83c..d33c9f4d2 100644 --- a/dwds/test/instances/record_inspection_test.dart +++ b/dwds/test/instances/record_inspection_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/record_type_inspection_canary_test.dart b/dwds/test/instances/record_type_inspection_canary_test.dart index 50b8e7420..01cffdfff 100644 --- a/dwds/test/instances/record_type_inspection_canary_test.dart +++ b/dwds/test/instances/record_type_inspection_canary_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/record_type_inspection_test.dart b/dwds/test/instances/record_type_inspection_test.dart index abf57d6dc..ab7dfa913 100644 --- a/dwds/test/instances/record_type_inspection_test.dart +++ b/dwds/test/instances/record_type_inspection_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/type_inspection_canary_test.dart b/dwds/test/instances/type_inspection_canary_test.dart index 65eaf0c29..9f9724639 100644 --- a/dwds/test/instances/type_inspection_canary_test.dart +++ b/dwds/test/instances/type_inspection_canary_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/instances/type_inspection_test.dart b/dwds/test/instances/type_inspection_test.dart index 4045528fa..8cde4afb5 100644 --- a/dwds/test/instances/type_inspection_test.dart +++ b/dwds/test/instances/type_inspection_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/javascript_builder_test.dart b/dwds/test/javascript_builder_test.dart index 41fd8fa63..b2d50de68 100644 --- a/dwds/test/javascript_builder_test.dart +++ b/dwds/test/javascript_builder_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/services/javascript_builder.dart'; import 'package:test/test.dart'; diff --git a/dwds/test/listviews_test.dart b/dwds/test/listviews_test.dart index 4cff22933..fe07d5ee2 100644 --- a/dwds/test/listviews_test.dart +++ b/dwds/test/listviews_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/load_strategy_test.dart b/dwds/test/load_strategy_test.dart index 1d1bc2551..3d4af5712 100644 --- a/dwds/test/load_strategy_test.dart +++ b/dwds/test/load_strategy_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 1)) +library; import 'package:dwds/dwds.dart'; import 'package:dwds/src/config/tool_configuration.dart'; diff --git a/dwds/test/location_test.dart b/dwds/test/location_test.dart index 28cf8323f..517a7d969 100644 --- a/dwds/test/location_test.dart +++ b/dwds/test/location_test.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/debugging/location.dart'; import 'package:dwds/src/utilities/dart_uri.dart'; diff --git a/dwds/test/metadata/class_test.dart b/dwds/test/metadata/class_test.dart index 5b44890f4..8b3a306d6 100644 --- a/dwds/test/metadata/class_test.dart +++ b/dwds/test/metadata/class_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/debugging/metadata/class.dart'; import 'package:test/test.dart'; diff --git a/dwds/test/metadata_test.dart b/dwds/test/metadata_test.dart index d31c0d5b0..a4dd01cdd 100644 --- a/dwds/test/metadata_test.dart +++ b/dwds/test/metadata_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/debugging/metadata/module_metadata.dart'; import 'package:dwds/src/debugging/metadata/provider.dart'; diff --git a/dwds/test/objects_test.dart b/dwds/test/objects_test.dart index 820bbc5cf..c30f3baec 100644 --- a/dwds/test/objects_test.dart +++ b/dwds/test/objects_test.dart @@ -5,6 +5,7 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/utilities/objects.dart'; import 'package:test/test.dart'; diff --git a/dwds/test/package_uri_mapper_test.dart b/dwds/test/package_uri_mapper_test.dart index 45518e42b..ea52a188f 100644 --- a/dwds/test/package_uri_mapper_test.dart +++ b/dwds/test/package_uri_mapper_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'dart:io'; diff --git a/dwds/test/puppeteer/extension_test_mv2.dart b/dwds/test/puppeteer/extension_test_mv2.dart index aefa21867..392ef7a17 100644 --- a/dwds/test/puppeteer/extension_test_mv2.dart +++ b/dwds/test/puppeteer/extension_test_mv2.dart @@ -7,6 +7,8 @@ 'linux': Skip('https://github.com/dart-lang/webdev/issues/1787'), }) @Timeout(Duration(minutes: 5)) +library; + import 'package:test/test.dart'; import 'extension_common.dart'; diff --git a/dwds/test/puppeteer/extension_test_mv3.dart b/dwds/test/puppeteer/extension_test_mv3.dart index 730d6e03f..b9b42ce87 100644 --- a/dwds/test/puppeteer/extension_test_mv3.dart +++ b/dwds/test/puppeteer/extension_test_mv3.dart @@ -7,6 +7,8 @@ 'linux': Skip('https://github.com/dart-lang/webdev/issues/1787'), }) @Timeout(Duration(minutes: 5)) +library; + import 'package:test/test.dart'; import 'extension_common.dart'; diff --git a/dwds/test/readers/frontend_server_asset_reader_test.dart b/dwds/test/readers/frontend_server_asset_reader_test.dart index ed8e4e5ed..cca542a9b 100644 --- a/dwds/test/readers/frontend_server_asset_reader_test.dart +++ b/dwds/test/readers/frontend_server_asset_reader_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'dart:io'; import 'package:dwds/src/readers/frontend_server_asset_reader.dart'; diff --git a/dwds/test/readers/proxy_server_asset_reader_test.dart b/dwds/test/readers/proxy_server_asset_reader_test.dart index 3ae4d0df9..501a1665a 100644 --- a/dwds/test/readers/proxy_server_asset_reader_test.dart +++ b/dwds/test/readers/proxy_server_asset_reader_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/readers/proxy_server_asset_reader.dart'; import 'package:test/test.dart'; diff --git a/dwds/test/refresh_test.dart b/dwds/test/refresh_test.dart index 979fdf60d..23cbcf916 100644 --- a/dwds/test/refresh_test.dart +++ b/dwds/test/refresh_test.dart @@ -6,7 +6,7 @@ /// tests. @TestOn('vm') @Timeout(Duration(minutes: 2)) -library refresh_test; +library; import 'dart:async'; diff --git a/dwds/test/reload_correctness_test.dart b/dwds/test/reload_correctness_test.dart index 95039e545..ffc7e3564 100644 --- a/dwds/test/reload_correctness_test.dart +++ b/dwds/test/reload_correctness_test.dart @@ -5,6 +5,8 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 5)) +library; + import 'package:dwds/dwds.dart'; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; diff --git a/dwds/test/reload_test.dart b/dwds/test/reload_test.dart index e9b23712d..2f4544a41 100644 --- a/dwds/test/reload_test.dart +++ b/dwds/test/reload_test.dart @@ -5,6 +5,8 @@ @Tags(['daily']) @TestOn('vm') @Timeout(Duration(minutes: 5)) +library; + import 'package:dwds/dwds.dart'; import 'package:test/test.dart'; import 'package:test_common/logging.dart'; diff --git a/dwds/test/run_request_test.dart b/dwds/test/run_request_test.dart index c7afc0d11..612a8f640 100644 --- a/dwds/test/run_request_test.dart +++ b/dwds/test/run_request_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'dart:async'; import 'package:test/test.dart'; diff --git a/dwds/test/screenshot_test.dart b/dwds/test/screenshot_test.dart index 7e02c47c8..fe999cd9f 100644 --- a/dwds/test/screenshot_test.dart +++ b/dwds/test/screenshot_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:test/test.dart'; import 'package:test_common/test_sdk_configuration.dart'; diff --git a/dwds/test/sdk_configuration_test.dart b/dwds/test/sdk_configuration_test.dart index bca43573c..b772b58b8 100644 --- a/dwds/test/sdk_configuration_test.dart +++ b/dwds/test/sdk_configuration_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; + import 'dart:io'; import 'package:dwds/src/utilities/sdk_configuration.dart'; diff --git a/dwds/test/skip_list_test.dart b/dwds/test/skip_list_test.dart index 99f09e1d8..7fc80259e 100644 --- a/dwds/test/skip_list_test.dart +++ b/dwds/test/skip_list_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'package:dwds/src/debugging/location.dart'; import 'package:dwds/src/debugging/skip_list.dart'; diff --git a/dwds/test/utilities_test.dart b/dwds/test/utilities_test.dart index 4da71765a..f8ff4a306 100644 --- a/dwds/test/utilities_test.dart +++ b/dwds/test/utilities_test.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. @Timeout(Duration(minutes: 1)) +library; + import 'package:dwds/src/utilities/shared.dart'; import 'package:test/test.dart'; import 'package:vm_service/vm_service.dart'; diff --git a/dwds/test/variable_scope_test.dart b/dwds/test/variable_scope_test.dart index b879317b2..1567f7188 100644 --- a/dwds/test/variable_scope_test.dart +++ b/dwds/test/variable_scope_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; + import 'package:dwds/src/debugging/dart_scope.dart'; import 'package:dwds/src/services/chrome_proxy_service.dart'; import 'package:test/test.dart'; diff --git a/dwds/test/web/batched_stream_test.dart b/dwds/test/web/batched_stream_test.dart index 76634cb7a..3fd0c0702 100644 --- a/dwds/test/web/batched_stream_test.dart +++ b/dwds/test/web/batched_stream_test.dart @@ -4,6 +4,7 @@ @Retry(0) @Timeout(Duration(minutes: 2)) +library; import 'dart:async'; import 'dart:io'; diff --git a/dwds/web/client.dart b/dwds/web/client.dart index 79bc31512..e43ec90b7 100644 --- a/dwds/web/client.dart +++ b/dwds/web/client.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library hot_reload_client; +library; import 'dart:async'; import 'dart:convert'; diff --git a/dwds/web/promise.dart b/dwds/web/promise.dart index 30781e51b..21510e416 100644 --- a/dwds/web/promise.dart +++ b/dwds/web/promise.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library webdev.web.promise; +library; import 'dart:async'; diff --git a/dwds/web/reloader/require_restarter.dart b/dwds/web/reloader/require_restarter.dart index 3c9ef262e..0990b3052 100644 --- a/dwds/web/reloader/require_restarter.dart +++ b/dwds/web/reloader/require_restarter.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @JS() -library require_reloading_manager; +library; import 'dart:async'; import 'dart:collection'; diff --git a/fixtures/_testCircular1Sound/lib/library1.dart b/fixtures/_testCircular1Sound/lib/library1.dart index 1395d1b1e..3ed4b65bd 100644 --- a/fixtures/_testCircular1Sound/lib/library1.dart +++ b/fixtures/_testCircular1Sound/lib/library1.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// A library that we can import. -library _test_circular1_sound; +library; import 'package:_test_circular2_sound/library2.dart'; diff --git a/fixtures/_testSound/example/scopes/main.dart b/fixtures/_testSound/example/scopes/main.dart index ea7338a16..f553d75c1 100644 --- a/fixtures/_testSound/example/scopes/main.dart +++ b/fixtures/_testSound/example/scopes/main.dart @@ -2,7 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// An example with more complicated scope +/// An example with more complicated scope. +library; + import 'dart:async'; import 'dart:collection'; diff --git a/fixtures/_testSound/lib/deferred_library.dart b/fixtures/_testSound/lib/deferred_library.dart index e550ee822..71d1c1de8 100644 --- a/fixtures/_testSound/lib/deferred_library.dart +++ b/fixtures/_testSound/lib/deferred_library.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// A library that we can import. -library test_deferred_library; +library; void deferredPrintLocal() { print('hello from deferred library'); // Breakpoint: DeferredPrintLocal diff --git a/fixtures/_testSound/lib/library.dart b/fixtures/_testSound/lib/library.dart index 0689836de..c00cf8ae0 100644 --- a/fixtures/_testSound/lib/library.dart +++ b/fixtures/_testSound/lib/library.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// A library that we can import. -library test_library; +library; int aVariable = 3; diff --git a/fixtures/_webdevSoundSmoke/web/scopes_main.dart b/fixtures/_webdevSoundSmoke/web/scopes_main.dart index 228b1f2c6..8aba9db7b 100644 --- a/fixtures/_webdevSoundSmoke/web/scopes_main.dart +++ b/fixtures/_webdevSoundSmoke/web/scopes_main.dart @@ -2,7 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// An example with more complicated scope +/// An example with more complicated scope. +library; + import 'dart:async'; import 'dart:collection'; diff --git a/frontend_server_client/test/example/vm_client_test.dart b/frontend_server_client/test/example/vm_client_test.dart index 50fc41679..1c4bd8278 100644 --- a/frontend_server_client/test/example/vm_client_test.dart +++ b/frontend_server_client/test/example/vm_client_test.dart @@ -4,6 +4,8 @@ // TODO: The examples don't work on windows @TestOn('!windows') +library; + import 'dart:io'; import 'package:test/test.dart'; diff --git a/frontend_server_client/test/example/web_client_test.dart b/frontend_server_client/test/example/web_client_test.dart index 7add4d16a..6c8fd81d5 100644 --- a/frontend_server_client/test/example/web_client_test.dart +++ b/frontend_server_client/test/example/web_client_test.dart @@ -4,6 +4,8 @@ // TODO: The examples don't work on windows @TestOn('!windows') +library; + import 'dart:io'; import 'package:test/test.dart'; diff --git a/frontend_server_client/test/frontend_server_client_test.dart b/frontend_server_client/test/frontend_server_client_test.dart index 4011c3ef3..91cdd3e99 100644 --- a/frontend_server_client/test/frontend_server_client_test.dart +++ b/frontend_server_client/test/frontend_server_client_test.dart @@ -3,6 +3,8 @@ // found in the LICENSE file. @TestOn('vm') +library; + import 'dart:convert'; import 'dart:io'; diff --git a/test_common/pubspec.yaml b/test_common/pubspec.yaml index 2ddf1ce65..ea413e4c6 100644 --- a/test_common/pubspec.yaml +++ b/test_common/pubspec.yaml @@ -14,5 +14,5 @@ dependencies: test: ^1.21.1 dev_dependencies: - lints: ^3.0.0 + lints: ^4.0.0 pubspec_parse: ^1.2.2 diff --git a/test_common/test/proper_release_test.dart b/test_common/test/proper_release_test.dart index c36914992..265d617f2 100644 --- a/test_common/test/proper_release_test.dart +++ b/test_common/test/proper_release_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Tags(['release']) +library; + import 'dart:io'; import 'package:path/path.dart' as p; diff --git a/test_common/test/sdk_asset_generator_test.dart b/test_common/test/sdk_asset_generator_test.dart index 2d45cd0ea..8ae8b8840 100644 --- a/test_common/test/sdk_asset_generator_test.dart +++ b/test_common/test/sdk_asset_generator_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'dart:io'; diff --git a/test_common/test/test_sdk_configuration_test.dart b/test_common/test/test_sdk_configuration_test.dart index 3e95ac645..96b9ae54c 100644 --- a/test_common/test/test_sdk_configuration_test.dart +++ b/test_common/test/test_sdk_configuration_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') @Timeout(Duration(minutes: 2)) +library; import 'dart:io'; diff --git a/webdev/test/build/ensure_build_test.dart b/webdev/test/build/ensure_build_test.dart index 599556d7d..01e102a15 100644 --- a/webdev/test/build/ensure_build_test.dart +++ b/webdev/test/build/ensure_build_test.dart @@ -6,6 +6,8 @@ @OnPlatform({ 'windows': Skip('https://github.com/dart-lang/webdev/issues/711'), }) +library; + import 'package:build_verify/build_verify.dart'; import 'package:test/test.dart'; diff --git a/webdev/test/build/min_sdk_test.dart b/webdev/test/build/min_sdk_test.dart index 9a12dbab8..d5948c93d 100644 --- a/webdev/test/build/min_sdk_test.dart +++ b/webdev/test/build/min_sdk_test.dart @@ -4,6 +4,8 @@ @TestOn('vm') @Skip('Intended to run in analyze stage on stable SDK only, see mono_pkg.yaml') +library; + import 'dart:io'; import 'package:pub_semver/pub_semver.dart'; diff --git a/webdev/test/chrome_test.dart b/webdev/test/chrome_test.dart index f0b369f12..cd3db874c 100644 --- a/webdev/test/chrome_test.dart +++ b/webdev/test/chrome_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(seconds: 60)) +library; + import 'dart:async'; import 'dart:io'; diff --git a/webdev/test/daemon/app_domain_test.dart b/webdev/test/daemon/app_domain_test.dart index 20befa005..7f1584b3c 100644 --- a/webdev/test/daemon/app_domain_test.dart +++ b/webdev/test/daemon/app_domain_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'dart:convert'; import 'dart:io'; diff --git a/webdev/test/daemon/daemon_domain_test.dart b/webdev/test/daemon/daemon_domain_test.dart index 45cfdf07d..20cd84966 100644 --- a/webdev/test/daemon/daemon_domain_test.dart +++ b/webdev/test/daemon/daemon_domain_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; import 'dart:convert'; diff --git a/webdev/test/daemon/launch_app_test.dart b/webdev/test/daemon/launch_app_test.dart index d37e74ac0..9e95884cc 100644 --- a/webdev/test/daemon/launch_app_test.dart +++ b/webdev/test/daemon/launch_app_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 2)) +library; + import 'package:test/test.dart'; import '../test_utils.dart'; diff --git a/webdev/test/e2e_test.dart b/webdev/test/e2e_test.dart index 7d339a6cb..59330970c 100644 --- a/webdev/test/e2e_test.dart +++ b/webdev/test/e2e_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @Timeout(Duration(minutes: 5)) +library; + import 'dart:io'; import 'package:io/io.dart'; diff --git a/webdev/test/installation_test.dart b/webdev/test/installation_test.dart index f1c8916c0..16a792057 100644 --- a/webdev/test/installation_test.dart +++ b/webdev/test/installation_test.dart @@ -4,6 +4,8 @@ @Tags(['daily']) @Timeout(Duration(minutes: 3)) +library; + import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/webdev/test/readme_test.dart b/webdev/test/readme_test.dart index 77def258a..a5db53912 100644 --- a/webdev/test/readme_test.dart +++ b/webdev/test/readme_test.dart @@ -6,6 +6,8 @@ @OnPlatform({ 'windows': Skip('https://github.com/dart-lang/webdev/issues/711'), }) +library; + import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/webdev/test/utils_test.dart b/webdev/test/utils_test.dart index 8725483ce..fa8841352 100644 --- a/webdev/test/utils_test.dart +++ b/webdev/test/utils_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Retry(0) +library; import 'dart:async'; import 'dart:io';