617108e49d
This patch adds the same tox -efast8 check for testing pep8 violations against future patches. This is a bit faster, because it only tests what has changed in your current repo. Change-Id: I6eff6b5f57d947f8c1d0c832227d0f7e15d4bc6f
16 lines
299 B
Bash
Executable File
16 lines
299 B
Bash
Executable File
#!/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
|