test(ci): 闸2 Dart 支柱4 lint 升 error 级(真守门)
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user