Files
2ffdf2e9173ca2ad0f95ac7f565da64b8b62691f
nova /tools /flake8wrap.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
682 B
Bash
Raw Normal View History

#
# A simple wrapper around flake8 which makes it possible
# to ask it to only verify files changed in the current
# git HEAD patch.
#
# Intended to be invoked via tox:
#
# tox -epep8 -- -HEAD
#
if test "x1ドル" = "x-HEAD" ; then
shift
files=$(git diff --name-only HEAD~1 | tr '\n' ' ')
echo "Running flake8 on ${files}"
echo "Consider using the 'pre-commit' tool instead."
echo ""
echo " pip install --user pre-commit"
echo " pre-commit install --allow-missing-config"
echo ""
else
echo "Running flake8 on all files"
fi