fix(ci): run pub get before dart format check

Without pub get, dart format cannot resolve package URIs and uses a
different language version, causing spurious failures for correctly
formatted files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas SharedInbox
2026-05-17 09:06:03 +02:00
co-authored by Claude Sonnet 4.6
parent 36cf8ccf34
commit f2d9459f44
+1
View File
@@ -71,6 +71,7 @@ func (m *Ci) CheckLayers(ctx context.Context, source *dagger.Directory) (string,
// Run dart format check
func (m *Ci) Format(ctx context.Context, source *dagger.Directory) (string, error) {
return m.Base(source).
WithExec([]string{"flutter", "pub", "get"}).
WithExec([]string{"dart", "format", "--output=none", "--set-exit-if-changed", "lib", "test"}).
Stdout(ctx)
}