From 945c2e2f8d7953a1f7bf358d2d1838a07a14cbb0 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Thu, 25 Jun 2026 13:45:31 +0800 Subject: [PATCH] =?UTF-8?q?test(ci):=20=E9=97=B82=20Dart=20=E6=94=AF?= =?UTF-8?q?=E6=9F=B14=20lint=20=E5=8D=87=20error=20=E7=BA=A7(=E7=9C=9F?= =?UTF-8?q?=E5=AE=88=E9=97=A8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit analyze 闸修好后(exit 0),把支柱4 两条规则提升为 error 级: - only_throw_errors / avoid_catching_errors → analyzer.errors: error - 即使 CI --no-fatal-infos,这俩违规仍致命(挡 merge);当前零违规 - 将来 throw 字符串 / catch Error → CI 红(支柱4:错误是有类型的值) Co-Authored-By: Claude Opus 4.8 --- client/analysis_options.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/client/analysis_options.yaml b/client/analysis_options.yaml index 42005a3..b7fde76 100644 --- a/client/analysis_options.yaml +++ b/client/analysis_options.yaml @@ -5,8 +5,17 @@ analyzer: # 噪音淹没自身 issue,让 analyze 闸形同虚设)。 exclude: - packages/lucide_icons_patched/** + # 支柱4(错误是有类型的值)提升为 error 级真守门:即使 CI 用 --no-fatal-infos, + # 这两条仍致命(违规挡 merge)。当前零违规。 + errors: + only_throw_errors: error + avoid_catching_errors: error linter: rules: prefer_const_constructors: false prefer_const_literals_to_create_immutables: false + # 支柱4(错误是值):只抛 Error/Exception(不抛字符串/任意对象);不 catch Error + # (程序错误应让其崩、不该被吞)。详见 docs/dev-conventions.html。 + only_throw_errors: true + avoid_catching_errors: true