From 63695a575911ac0ac19b261cc31f1fd3a42e04fb Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Mon, 21 Sep 2026 13:31:33 -0400 Subject: [PATCH 1/5] ci: analyze in CI the way maintainers analyze locally The workflow ran the Dart analyzer with `fatal-infos: false` and `fatal-warnings: false`, before `pub get` and before code generation, so a green run said less than `melos run analyze` does. It now runs `melos run analyze:dart --no-select` after the build runner, which is exactly the first half of the local command. Records the two gaps this cannot close from here: DCM needs a runner binary and a licence secret, and the playground's DCM baseline hides 630 findings. Both are measured and written down, with the order to tackle them and a warning about `dcm fix`, which on this tree rewrote dependency-injection call sites and broke one file. --- .github/workflows/test.yml | 12 ++--- docs/maintainers/analysis-parity.md | 69 +++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 docs/maintainers/analysis-parity.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16a54880..349e285b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,11 +42,6 @@ jobs: with: melos-version: 7.8.1 - - uses: invertase/github-action-dart-analyzer@v1 - with: - fatal-infos: false - fatal-warnings: false - - name: Install dependencies run: fvm flutter pub get @@ -54,6 +49,13 @@ jobs: run: melos run build_runner:build --no-select timeout-minutes: 5 + # Runs what maintainers run: `dart analyze --fatal-infos` over every + # package, after code generation so generated files exist. DCM is the + # other half of `melos run analyze` and is not run here yet; see + # docs/maintainers/analysis-parity.md. + - name: Analyze + run: melos run analyze:dart --no-select + - name: Check Contract Schemas run: melos run contracts:check --no-select diff --git a/docs/maintainers/analysis-parity.md b/docs/maintainers/analysis-parity.md new file mode 100644 index 00000000..35b359e5 --- /dev/null +++ b/docs/maintainers/analysis-parity.md @@ -0,0 +1,69 @@ +# Static analysis: what runs where + +Maintainer notes, current as of 2026-09-21. + +## The commands + +| Command | What it runs | +| --- | --- | +| `melos run analyze` | `analyze:dart` then `analyze:dcm` | +| `melos run analyze:dart` | `dart analyze --fatal-infos` in every package | +| `melos run analyze:dcm` | `dcm analyze . --fatal-style --fatal-warnings` in every package that depends on `dart_code_metrics_presets` | +| `melos run analyze:all` | the above plus `dcm check-unused-files` and `dcm check-unused-code` | + +Run `melos run