Skip to content

Commit 865700f

Browse files
committed
Resolve local packages before the root Flutter analyze
The root flutter analyze discovers nested packages as their own analysis contexts, which fail to resolve dev dependencies until each package has run dart pub get. Move the local package lint step ahead of the root analyze so its pub get also serves the root run.
1 parent 67587b5 commit 865700f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/check-flutter.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ jobs:
4545
- name: Install dependencies
4646
run: flutter pub get --enforce-lockfile
4747

48-
- name: Check lints
49-
run: flutter analyze
50-
48+
# Runs before the root analyze: resolving each package also gives the
49+
# root analyzer a package config for the nested contexts it discovers.
5150
- name: Check local package lints
5251
run: |
5352
set -euo pipefail
@@ -56,6 +55,9 @@ jobs:
5655
(cd "$package" && dart pub get && dart analyze --fatal-infos)
5756
done
5857
58+
- name: Check lints
59+
run: flutter analyze
60+
5961
test:
6062
name: test
6163
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)