Don't pick up whole commented lines in the urlopen code-smell tests

This commit is contained in:
Toshio Kuratomi 2016-04-22 08:24:14 -07:00
parent 2b7f4395d6
commit e893b65a9b

View file

@ -4,6 +4,7 @@ BASEDIR=${1-"."}
URLLIB_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -H urlopen \{\} \;) URLLIB_USERS=$(find "$BASEDIR" -name '*.py' -exec grep -H urlopen \{\} \;)
URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/\(\n\|lib\/ansible\/module_utils\/urls.py\|lib\/ansible\/compat\/six\/_six.py\|.tox\)/d') URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/\(\n\|lib\/ansible\/module_utils\/urls.py\|lib\/ansible\/compat\/six\/_six.py\|.tox\)/d')
URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/^[^:]\+:#/d')
if test -n "$URLLIB_USERS" ; then if test -n "$URLLIB_USERS" ; then
printf "$URLLIB_USERS" printf "$URLLIB_USERS"
exit 1 exit 1