ansible/test/code-smell/use-compat-six.sh

13 lines
295 B
Bash
Raw Normal View History

#!/bin/sh
# Do we want to check dynamic inventory, bin, etc?
BASEDIR=${1-"lib"}
2016-06-04 18:05:21 +00:00
SIX_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -wH six \{\} \;|grep import |grep -v ansible.compat|grep -v ansible.module_utils)
if test -n "$SIX_USERS" ; then
printf "$SIX_USERS"
exit 1
else
exit 0
fi