zun/tools/fast8.sh
Sheel Rana 1f26d590a4 Added common utilities
This patchset contains some common utilities like
tox pep8 fast environment, context generate/check,
yaml load.

Change-Id: I855e40a3562b9c4fa015dd13f31642882097833e
2016-05-14 16:57:07 +05:30

17 lines
300 B
Bash

#!/bin/bash
cd $(dirname "$0")/..
CHANGED=$(git diff --name-only HEAD~1 | tr '\n' ' ')
# Skip files that don't exist
# (have been git rm'd)
CHECK=""
for FILE in $CHANGED; do
if [ -f "$FILE" ]; then
CHECK="$CHECK $FILE"
fi
done
diff -u --from-file /dev/null $CHECK | flake8 --diff