We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent decf05a commit ce0ad9aCopy full SHA for ce0ad9a
1 file changed
.github/workflows/prod.yml
@@ -89,7 +89,20 @@ jobs:
89
run: dart pub get
90
91
- name: Verify formatter
92
- run: dart format --output=none --set-exit-if-changed .
+ # Scope to this package's own primary source. Avoids walking into
93
+ # sub-projects (example/, smoke_test/) that carry their own pubspec
94
+ # but aren't `pub get`-ed in CI — formatting them with no package
95
+ # config triggers a language-version fallback and spurious diffs.
96
+ run: |
97
+ DIRS=""
98
+ for d in lib test bin; do
99
+ [ -d "$d" ] && DIRS="$DIRS $d"
100
+ done
101
+ if [ -z "$DIRS" ]; then
102
+ echo "No primary source directories to format."
103
+ exit 0
104
+ fi
105
+ dart format --output=none --set-exit-if-changed $DIRS
106
107
- name: Static analysis
108
run: dart analyze --fatal-infos
0 commit comments