Files
flame/scripts/lint.sh
Erick Zanardo e43e6817fc PR nits
2020-06-23 19:38:24 -03:00

30 lines
473 B
Bash
Executable File

#!/usr/bin/env bash
set -xe
if [[ $(flutter format -n .) ]]; then
echo "flutter format issue"
exit 1
fi
flutter pub get
# We need to run pubget on all the examples
for f in doc/examples/**/pubspec.yaml; do
d=$(dirname $f)
cd $d
flutter pub get
cd - > /dev/null
done
cd .
flutter pub get
result=$(flutter analyze .)
if ! echo "$result" | grep -q "No issues found!"; then
echo "$result"
echo "flutter analyze issue: $1"
exit 1
fi
echo "success"
exit 0