diff --git a/test/code-smell/use-compat-six.sh b/test/code-smell/use-compat-six.sh new file mode 100755 index 00000000000..663d5279775 --- /dev/null +++ b/test/code-smell/use-compat-six.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Do we want to check dynamic inventory, bin, etc? +BASEDIR=${1-"lib"} + +SIX_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -H six \{\} \;|grep import |grep -v ansible.compat) +if test -n "$SIX_USERS" ; then + printf "$SIX_USERS" + exit 1 +else + exit 0 +fi