check-format.sh 306 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. ## Used in CI. this scripts wraps format_app.py
  3. ## and check git diff
  4. set -euo pipefail
  5. cd -P -- "$(dirname -- "$0")/.."
  6. make fmt
  7. DIFF_FILES="$(git diff --name-only)"
  8. if [ "$DIFF_FILES" != '' ]; then
  9. echo "ERROR: Below files need reformat"
  10. echo "$DIFF_FILES"
  11. exit 1
  12. fi