Merge "Fix fast8 tox env"
This commit is contained in:
commit
ef51e9b6b5
@ -11,15 +11,22 @@ fi
|
|||||||
echo "Checking last $NUM_COMMITS commits."
|
echo "Checking last $NUM_COMMITS commits."
|
||||||
|
|
||||||
cd $(dirname "$0")/..
|
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
|
# Skip files that don't exist
|
||||||
# (have been git rm'd)
|
# (have been git rm'd)
|
||||||
CHECK=""
|
CHECK=""
|
||||||
for FILE in $CHANGED; do
|
for FILE in $CHANGED; do
|
||||||
if [ -f "$FILE" ]; then
|
if [ -f "$FILE" ]; then
|
||||||
CHECK="$CHECK $FILE"
|
CHECK+="$FILE "
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
diff -u --from-file /dev/null $CHECK | flake8 --diff
|
flake8 $CHECK
|
||||||
|
Loading…
Reference in New Issue
Block a user