4d6a578d |
#!/bin/bash |
011ca71b |
SCRIPTS_DIR="$(dirname ${0})"
|
4d6a578d |
# Sanify check for all json files.
echo "Sanity check for all json files..." |
011ca71b |
while read f; do
if ! json_pp -t null < "${f}" >& /dev/null; then
echo "Please check:${f} for syntax errors"
exit 1
fi |
26b55679 |
done < <(find "${SCRIPTS_DIR}/../" \( -name '*stage*' \) -prune -o -name "*.json" -type f | grep -v "/stage") |
4d6a578d |
echo "Checking all python code is compilable..." |
011ca71b |
while read f; do |
9810c429 |
if ! python3 -m py_compile "${f}"; then |
f8f09a53 |
echo "Please check:${f} for compilation errors" |
011ca71b |
exit 1
fi |
26b55679 |
done < <(find "${SCRIPTS_DIR}/../" \( -name '*stage*' \) -prune -o -name "*.py" -type f | grep -v "/stage") |