From 37258e1cb262957065191aff690d3d47eadf2305 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Wed, 8 Jul 2026 10:11:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(client/test):=20=E5=88=A0=E6=9C=AA=E7=94=A8?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=BF=AE=20flutter=20analyze(CI=20Flutter=20?= =?UTF-8?q?job=20=E5=85=A8=E7=BB=BF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit stats_device_filter_test.dart 的 const t = StringsZh() 声明后未使用 → unused_local_variable warning → flutter analyze --no-fatal-infos exit 1 → CI Flutter job 一直红(既存,与 i18n 修复无关)。删该变量 + 随之无用的 strings_zh import。 容器复验:analyze exit 0(0 warning)· test +97 过 · 覆盖率 38.5%≥28%。 Co-Authored-By: Claude Opus 4.8 --- client/test/widget/stats_device_filter_test.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/test/widget/stats_device_filter_test.dart b/client/test/widget/stats_device_filter_test.dart index 9d3e2d6..2c15056 100644 --- a/client/test/widget/stats_device_filter_test.dart +++ b/client/test/widget/stats_device_filter_test.dart @@ -6,7 +6,6 @@ import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:http/http.dart' as http; import 'package:http/testing.dart'; -import 'package:pangolin_vpn/l10n/strings_zh.dart'; import 'package:pangolin_vpn/pangolin_theme.dart'; import 'package:pangolin_vpn/screens/stats_page.dart'; import 'package:pangolin_vpn/services/api_client.dart'; @@ -38,7 +37,6 @@ class _LoggedIn implements TokenStore { void main() { setUpAll(disableGoogleFontsFetching); - const t = StringsZh(); testWidgets('选设备 → /v1/usage 带 device=', (tester) async { await tester.binding.setSurfaceSize(const Size(900, 1200));