diff options
Diffstat (limited to 'test/sanity/code-smell/no-basestring.sh')
-rwxr-xr-x | test/sanity/code-smell/no-basestring.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/sanity/code-smell/no-basestring.sh b/test/sanity/code-smell/no-basestring.sh index ee5a58343e..59a6c9bf55 100755 --- a/test/sanity/code-smell/no-basestring.sh +++ b/test/sanity/code-smell/no-basestring.sh @@ -6,10 +6,18 @@ BASEDIR=${1-"."} # * basestring is still present and harmless in comments # * basestring is also currently present in modules. Porting of modules is more # of an Ansible 2.3 or greater goal. -BASESTRING_USERS=$(grep -r basestring $BASEDIR |grep isinstance| grep -v lib/ansible/compat/six/_six.py|grep -v lib/ansible/module_utils/six.py|grep -v lib/ansible/modules/core|grep -v lib/ansible/modules/extras) +BASESTRING_USERS=$(grep -r basestring "${BASEDIR}" \ + | grep isinstance \ + | grep -v \ + -e lib/ansible/compat/six/_six.py \ + -e lib/ansible/module_utils/six.py \ + -e lib/ansible/modules/core \ + -e lib/ansible/modules/extras \ + -e '/.tox/' \ + ) -if test -n "$BASESTRING_USERS" ; then - printf "$BASESTRING_USERS" +if test -n "${BASESTRING_USERS}"; then + printf "%s" "${BASESTRING_USERS}" exit 1 else exit 0 |