mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
71819c0a60
- Correct directory name in test/README.md - Move code-smell tests to test/sanity/code-smell - Update code-smell.sh to use new script paths - Add test/integration/target-prefixes.win for ansible-test - Move module unit tests to match module directory layout
13 lines
417 B
Bash
Executable file
13 lines
417 B
Bash
Executable file
#!/bin/sh
|
|
|
|
BASEDIR=${1-"."}
|
|
|
|
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\/module_utils\/six.py\|lib\/ansible\/compat\/six\/_six.py\|.tox\)/d')
|
|
URLLIB_USERS=$(echo "$URLLIB_USERS" | sed '/^[^:]\+:#/d')
|
|
if test -n "$URLLIB_USERS" ; then
|
|
printf "$URLLIB_USERS"
|
|
exit 1
|
|
else
|
|
exit 0
|
|
fi
|