Skip to content

Commit ce0ad9a

Browse files
committed
update
1 parent decf05a commit ce0ad9a

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/prod.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,20 @@ jobs:
8989
run: dart pub get
9090

9191
- name: Verify formatter
92-
run: dart format --output=none --set-exit-if-changed .
92+
# 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
93106
94107
- name: Static analysis
95108
run: dart analyze --fatal-infos

0 commit comments

Comments
 (0)