Fix fast8 tox env
flake8 --diff no longer exists. Change-Id: Idf93686a13cfc40923bc142cad058c97fecf5177
This commit is contained in:
parent
e9c18c7f94
commit
26a9884c2a
@ -11,15 +11,22 @@ fi
|
||||
echo "Checking last $NUM_COMMITS commits."
|
||||
|
||||
cd $(dirname "$0")/..
|
||||
CHANGED=$(git diff --name-only HEAD~${NUM_COMMITS} | tr '\n' ' ')
|
||||
CHANGED=""
|
||||
CHANGED+="$(git diff --name-only HEAD~${NUM_COMMITS} \*.py | tr '\n' ' ')"
|
||||
|
||||
while [[ -z $CHANGED ]]; do
|
||||
# Search back until we find a commit containing python files
|
||||
NUM_COMMITS=$((NUM_COMMITS + 1))
|
||||
CHANGED+="$(git diff --name-only HEAD~${NUM_COMMITS} \*.py | tr '\n' ' ')" ;
|
||||
done
|
||||
|
||||
# Skip files that don't exist
|
||||
# (have been git rm'd)
|
||||
CHECK=""
|
||||
for FILE in $CHANGED; do
|
||||
if [ -f "$FILE" ]; then
|
||||
CHECK="$CHECK $FILE"
|
||||
CHECK+="$FILE "
|
||||
fi
|
||||
done
|
||||
|
||||
diff -u --from-file /dev/null $CHECK | flake8 --diff
|
||||
flake8 $CHECK
|
||||
|
Loading…
Reference in New Issue
Block a user