Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- exec 1>&2
- git diff --cached --name-only --diff-filter=d -z HEAD | while IFS= read -r -d '' file ; do
- if [ "${file##*.}" = "json" ]; then
- if ! cat $file | python -m json.tool > /dev/null; then
- echo $file
- exit 1
- fi
- fi
- done
Add Comment
Please, Sign In to add comment