Add empty-init code-smell script. (#18406)

Also removed boilerplate from otherwise empty __init__.py files
which should not contain any code (checked by empty-init script).
This commit is contained in:
Matt Clay
2016-11-07 15:02:13 -08:00
committed by GitHub
parent 6a3893c518
commit 8c270ac75f
27 changed files with 20 additions and 487 deletions

View File

@@ -0,0 +1,17 @@
#!/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