Guest User

Untitled

a guest
May 26th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/bin/bash
  2. exec 1>&2
  3.  
  4. git diff --cached --name-only --diff-filter=d -z HEAD | while IFS= read -r -d '' file ; do
  5. if [ "${file##*.}" = "json" ]; then
  6. if ! cat $file | python -m json.tool > /dev/null; then
  7. echo $file
  8. exit 1
  9. fi
  10. fi
  11. done
Add Comment
Please, Sign In to add comment