ee4604baf3
This currently doesn't report failures. Also restrict files tested to HEAD~1..HEAD instead of HEAD~2..HEAD. Change-Id: I4983db5594fc2746eb28ec87a74d5d0ba27c9aaf
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
|