feat(app): add fmp_lints with a wiring sentinel - #177
Merged
Merged
Conversation
flutter analyze does not show analyzer plugin diagnostics (#187999), so CI runs dart analyze and a sentinel proves every enabled rule fires.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
內容
M1 PR 3:
fmp_lints與接線哨兵(ADR 0015 §決定 2;.trellis/tasks/archive/2026-09/09-29-fmp-lints/prd.md)。app/packages/fmp_lints/:用官方analysis_server_plugin自寫 13 條規則。fmp_toast_entry(ADR 0023);fmp_design_tokens(ADR 0024);fmp_material_import:取代 PR 2 的 static-rule 測試,ADR 0015 已補一句。app/AGENTS.md§ Lint 列出每一條。analyzer_testing做雙向變異,86 個測試;以 posix 與 Windows 路徑各跑一次。app/tool/lint_sentinel.dart:lib/與test/暫放違規檔,斷言dart analyze失敗,而且報出analysis_options.yaml開啟的每一條規則;appjob:加dart analyze --fatal-infos、哨兵與規則測試。flutter analyze保留,因為它有 Flutter 專屬的診斷。riverpod_lint3.1.9:已接上新插件系統。missing_provider_scope暫時關閉,因為還沒用 Riverpod;第一個加ProviderScope的 PR 要打開它(已記在 M1 implement)。版本
analysis_server_plugin0.3.18、analyzer13.3.0、analyzer_testing0.3.2,都不是最新版。flutter_test釘test_api 0.7.12,把 analyzer 限制在 14 以下,最新版解不出來。solver 訊息記在 research/notes.md。§7 實測:
dart analyze看得到插件診斷,flutter analyze看不到(flutter/flutter#187999)同一個含
catch (_) {}的暫放檔:Review 指南
Dio、SnackBar、Platform),不查宣告來自哪個函式庫,所以同名的自訂型別也會被報。這是刻意的,寫在app/AGENTS.md。debugPrint是函式型別的變數,原本抓不到;EdgeInsets.all((8))用括號可以繞過。fmp_design_tokens與fmp_toast_entry依 ADR 的用意擴到相鄰寫法:EdgeInsetsDirectional;Radius.circular;Color.fromARGB;ScaffoldMessenger.maybeOf。驗證
fmp_lints:dart test,兩種路徑模式各 86 個全過。app/:dart analyze --fatal-infos;flutter analyze;flutter test:36 過、1 跳過(live);