fix(ci): restore pub get before dart format to fix language version detection
Without flutter pub get, .dart_tool/package_config.json does not exist in the Dagger container. dart format then defaults to the current SDK version (3.11+) rather than the package's declared language version (3.3), applying tall-style formatting and failing on 90 files. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
64423d53ae
commit
f9d6d6f4cc
@@ -71,7 +71,10 @@ 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) {
|
||||
// pub get is required so .dart_tool/package_config.json exists; without it dart format
|
||||
// ignores the package's language version (3.3) and applies tall-style formatting.
|
||||
return m.Base(source).
|
||||
WithExec([]string{"flutter", "pub", "get"}).
|
||||
WithExec([]string{"dart", "format", "--output=none", "--set-exit-if-changed", "lib", "test"}).
|
||||
Stdout(ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user