From c48b2cda51eafaa9f76f3f1ab9e6112231c912ec Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Fri, 23 Feb 2024 09:36:01 -0800 Subject: [PATCH] Work towards https://github.com/dart-lang/linter/issues/4859 There are libraries outside a `lib/` directory, which violate `implementation_imports`. The fix here is to always add an 'ignore' exception, as the "implementation" being imported is the very package being exemplified. (Maybe that's a perfect reason to re-examine the public API of the package; can you create a good example / example test without importing the private implementation libraries?) --- .../example/integration_test/camera_error_code_test.dart | 1 + .../example/integration_test/camera_metadata_test.dart | 1 + .../camera_web/example/integration_test/camera_options_test.dart | 1 + .../camera_web/example/integration_test/camera_service_test.dart | 1 + .../camera/camera_web/example/integration_test/camera_test.dart | 1 + .../example/integration_test/camera_web_exception_test.dart | 1 + .../camera_web/example/integration_test/camera_web_test.dart | 1 + .../camera_web/example/integration_test/helpers/mocks.dart | 1 + .../example/integration_test/zoom_level_capability_test.dart | 1 + 9 files changed, 9 insertions(+) diff --git a/packages/camera/camera_web/example/integration_test/camera_error_code_test.dart b/packages/camera/camera_web/example/integration_test/camera_error_code_test.dart index e89018f7c512..6bd86b0fe8e5 100644 --- a/packages/camera/camera_web/example/integration_test/camera_error_code_test.dart +++ b/packages/camera/camera_web/example/integration_test/camera_error_code_test.dart @@ -4,6 +4,7 @@ import 'dart:html'; +// ignore: implementation_imports import 'package:camera_web/src/types/types.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/packages/camera/camera_web/example/integration_test/camera_metadata_test.dart b/packages/camera/camera_web/example/integration_test/camera_metadata_test.dart index 07252be5c7a2..fa4547726ce6 100644 --- a/packages/camera/camera_web/example/integration_test/camera_metadata_test.dart +++ b/packages/camera/camera_web/example/integration_test/camera_metadata_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore: implementation_imports import 'package:camera_web/src/types/types.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/packages/camera/camera_web/example/integration_test/camera_options_test.dart b/packages/camera/camera_web/example/integration_test/camera_options_test.dart index 6619ff41e03c..7dd25e375561 100644 --- a/packages/camera/camera_web/example/integration_test/camera_options_test.dart +++ b/packages/camera/camera_web/example/integration_test/camera_options_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore: implementation_imports import 'package:camera_web/src/types/types.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/packages/camera/camera_web/example/integration_test/camera_service_test.dart b/packages/camera/camera_web/example/integration_test/camera_service_test.dart index 09a18c011582..fb2279a09421 100644 --- a/packages/camera/camera_web/example/integration_test/camera_service_test.dart +++ b/packages/camera/camera_web/example/integration_test/camera_service_test.dart @@ -6,6 +6,7 @@ import 'dart:html'; import 'dart:js_util' as js_util; import 'package:camera_platform_interface/camera_platform_interface.dart'; +// ignore_for_file: implementation_imports import 'package:camera_web/src/camera.dart'; import 'package:camera_web/src/camera_service.dart'; import 'package:camera_web/src/shims/dart_js_util.dart'; diff --git a/packages/camera/camera_web/example/integration_test/camera_test.dart b/packages/camera/camera_web/example/integration_test/camera_test.dart index 705d7750e1a4..412ce7148bcf 100644 --- a/packages/camera/camera_web/example/integration_test/camera_test.dart +++ b/packages/camera/camera_web/example/integration_test/camera_test.dart @@ -8,6 +8,7 @@ import 'dart:ui'; import 'package:async/async.dart'; import 'package:camera_platform_interface/camera_platform_interface.dart'; +// ignore_for_file: implementation_imports import 'package:camera_web/src/camera.dart'; import 'package:camera_web/src/camera_service.dart'; import 'package:camera_web/src/types/types.dart'; diff --git a/packages/camera/camera_web/example/integration_test/camera_web_exception_test.dart b/packages/camera/camera_web/example/integration_test/camera_web_exception_test.dart index fcb54da1aed5..2647fe7f2b3b 100644 --- a/packages/camera/camera_web/example/integration_test/camera_web_exception_test.dart +++ b/packages/camera/camera_web/example/integration_test/camera_web_exception_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore: implementation_imports import 'package:camera_web/src/types/types.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/packages/camera/camera_web/example/integration_test/camera_web_test.dart b/packages/camera/camera_web/example/integration_test/camera_web_test.dart index 6c73bcf76bdc..08a169a542ce 100644 --- a/packages/camera/camera_web/example/integration_test/camera_web_test.dart +++ b/packages/camera/camera_web/example/integration_test/camera_web_test.dart @@ -8,6 +8,7 @@ import 'dart:html'; import 'package:async/async.dart'; import 'package:camera_platform_interface/camera_platform_interface.dart'; import 'package:camera_web/camera_web.dart'; +// ignore_for_file: implementation_imports import 'package:camera_web/src/camera.dart'; import 'package:camera_web/src/camera_service.dart'; import 'package:camera_web/src/types/types.dart'; diff --git a/packages/camera/camera_web/example/integration_test/helpers/mocks.dart b/packages/camera/camera_web/example/integration_test/helpers/mocks.dart index 855ef2b9c58e..d1fbdd574ba4 100644 --- a/packages/camera/camera_web/example/integration_test/helpers/mocks.dart +++ b/packages/camera/camera_web/example/integration_test/helpers/mocks.dart @@ -8,6 +8,7 @@ import 'dart:async'; import 'dart:html'; import 'dart:ui'; +// ignore_for_file: implementation_imports import 'package:camera_web/src/camera.dart'; import 'package:camera_web/src/camera_service.dart'; import 'package:camera_web/src/shims/dart_js_util.dart'; diff --git a/packages/camera/camera_web/example/integration_test/zoom_level_capability_test.dart b/packages/camera/camera_web/example/integration_test/zoom_level_capability_test.dart index 8614cd95880f..d93b42690e5e 100644 --- a/packages/camera/camera_web/example/integration_test/zoom_level_capability_test.dart +++ b/packages/camera/camera_web/example/integration_test/zoom_level_capability_test.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// ignore: implementation_imports import 'package:camera_web/src/types/types.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart';