blob: 6a4477c60d362214ad893086b739560e32c797e4 [file] [log] [blame]
#!/bin/bash
# Fast fail the script on failures.
set -e
# Check whether we need to format any files.
DARTFMT_OUT=$(dartfmt -n "$PACKAGE")
if [[ ! -z "$DARTFMT_OUT" ]]; then
printf "$PACKAGE has unformatted Dart files: \n$DARTFMT_OUT\n"
printf "Run 'dartfmt -w $PACKAGE'"
exit 1
fi