Files
zulip/tools/check-all
Keegan McAllister ae7c4b302b Add a bot to send yourself reminders of Google Calendar events
Run ./api/gcal-bot with no arguments for usage information.

(imported from commit cdc160aeffc16f54072b64370868aca3acc6ad67)
2012-10-21 18:21:12 -04:00

39 lines
774 B
Bash
Executable File

#!/bin/bash
SCRIPT_DIR="$(dirname "$0")"
EXITCODE=0
FILTER_IMPORTS="-v imported.but.unused"
if [ "$1" = "--imports" ]; then
FILTER_IMPORTS="."
fi
if ! "$SCRIPT_DIR"/jslint/check-all; then
EXITCODE=1;
fi
cd "$SCRIPT_DIR"/..;
# Some Python files don't have names ending in .py
PYTHON_FILES=$(cat <<EOF
api/examples/subscribe
api/examples/get-public-streams
api/examples/send-message
api/examples/print-messages
api/examples/print-next-message
api/examples/get-subscriptions
api/check-mirroring
api/gcal-bot
tools/update-deployment
tools/post-receive
EOF
)
PYTHON_FILES="$PYTHON_FILES $(git ls-files | grep '\.py$' | egrep -v '^(confirmation/|humbug/test_settings\.py)')"
if pyflakes $PYTHON_FILES | grep $FILTER_IMPORTS; then
EXITCODE=1;
fi
exit $EXITCODE