ironic/tools/flake8wrap.sh
John L. Villalovos 7e1287f243 Remove ironic_tempest_plugin/ directory
We now use the project openstack/ironic-tempest-plugin to store our
tempest plugin. All content from the ironic_tempest_plugin/ directory
has been ported to that project.

We no longer want to have the plugin content stored here so we delete
it.

Remove check in tools/flake8wrap.sh that prevented changes to the
ironic_tempest_plugin/ directory.

Change-Id: I700bd7b71472fa91f6bc02aebc055584df08e0ef
2018-01-05 15:12:13 -08:00

21 lines
477 B
Bash
Executable File

#!/bin/bash
#
# 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 "x$1" = "x-HEAD" ; then
shift
files=$(git diff --name-only HEAD~1 | tr '\n' ' ')
echo "Running flake8 on ${files}"
diff -u --from-file /dev/null ${files} | flake8 --diff "$@"
else
echo "Running flake8 on all files"
exec flake8 "$@"
fi