1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test/sanity/code-smell/empty-init.sh

18 lines
318 B
Bash
Raw Normal View History

#!/bin/sh
found=''
for path in lib/ansible/modules/ test/units/; do
files=$(find "${path}" -name __init__.py -size '+0')
if [ "${files}" ]; then
echo "${files}"
found=1
fi
done
if [ "${found}" ]; then
echo "One or more __init__.py file(s) listed above are non-empty."
exit 1
fi