Adding new flag for dev channel format (#841)

pull/846/head
Andrew Brogdon 4 years ago committed by GitHub
parent 9e0ba9a97e
commit 89d2849019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,14 @@
function ci_projects () { function ci_projects () {
local channel="$1" local channel="$1"
# The `-n` option has been replaced with a more flexible `-o` for "output"
# in dev.
if [ $channel == "dev" ]; then
format_option="-o none"
else
format_option="-n"
fi
shift shift
local arr=("$@") local arr=("$@")
for PROJECT_NAME in "${arr[@]}" for PROJECT_NAME in "${arr[@]}"
@ -13,15 +22,8 @@ function ci_projects () {
# Run the analyzer to find any static analysis issues. # Run the analyzer to find any static analysis issues.
flutter analyze flutter analyze
# Reformat the web plugin registrant, if necessary.
if [ -f "lib/generated_plugin_registrant.dart" ]
then
echo "Renaming $(pwd)/lib/generated_plugin_registrant.dart"
flutter format "lib/generated_plugin_registrant.dart"
fi
# Run the formatter on all the dart files to make sure everything's linted. # Run the formatter on all the dart files to make sure everything's linted.
flutter format -n --set-exit-if-changed . flutter format $format_option --set-exit-if-changed .
# Run the actual tests. # Run the actual tests.
if [ -d "test" ] if [ -d "test" ]

Loading…
Cancel
Save