fix(ci): 修 flutter analyze 闸长期 exit 1(形同虚设)

发现:CI flutter analyze 退出码 1(1204 个 info,0 error/warning),其中 1191 来自
第三方 vendored 包 lucide_icons_patched —— 这道闸一直红/无效。
- analysis_options.yaml:exclude packages/lucide_icons_patched/**(去 1191 噪音)
- ci.yml:flutter analyze --no-fatal-infos(info 是建议级不该硬挡 merge;
  error/warning 仍致命)→ analyze EXIT 0、闸真正可用
- 顺手清 11 个 clean 文件 info:auth_api 删 >>>AUTHLOG 调试 print 残留(+unused sw)、
  account_page/plan_card withOpacity→withValues、vpn_bridge where(is Map)→whereType、
  测试文件删多余 import + final→const
- 剩 2 个 info 在 stats-overhaul dirty 文件(stats_page/device_stat_row),留其合并清
- 验证:flutter analyze --no-fatal-infos EXIT 0(1204→2)、flutter test 48 全过

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-06-25 07:39:14 +08:00
parent 6bd5c04cba
commit dbd183ee00
8 changed files with 14 additions and 14 deletions
+1 -2
View File
@@ -7,7 +7,6 @@
// 4. selectOutbound 切换时产生 connecting → on 重连序列
// 5. getStatus / getActiveOutbound / setKillSwitch 返回正确值
import 'dart:async';
import 'package:flutter_test/flutter_test.dart';
import 'package:pangolin_vpn/bridge/vpn_bridge.dart';
import 'package:pangolin_vpn/bridge/vpn_bridge_mock.dart';
@@ -225,7 +224,7 @@ void main() {
// ── 5. VpnStatsEvent schema round-trip ───────────────────────
group('VpnStatsEvent schema', () {
test('fromMap / toMap round-trip', () {
final original = const VpnStatsEvent(
const original = VpnStatsEvent(
uploadBytes: 1024,
downloadBytes: 4096,
uploadSpeed: 512.0,
-1
View File
@@ -4,7 +4,6 @@
// 让 widget/golden 测试用真字体渲染、且不触发 google_fonts 运行时拉取(避免抛异常)。
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';