Skip to content
Commit c1d0e3c6 authored by Jerome Berthier's avatar Jerome Berthier Committed by hydrargyrum
Browse files

tools/pyflakes.sh: allow to override PYFILES from environment variable

Useful when using with a pre-push hook, it is useless to run flakes
on the whole code base every time you push.

Example of pre-push hook using this feature:

ref=$(git rev-list --boundary HEAD...master | grep "^-" | cut -c2-)
PYFILES="$(git diff ${ref} --name-only | grep -E "*.py$" | xargs)" $PWD/tools/pyflakes.sh
if [ "$?" -ne "0" ]; then
    echo >&2 "Flakes error"
    exit 1
fi
parent 47780392
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment