2016-12-14 00:39:03 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
ITERKEYS_USERS=$(grep -r -I iterkeys . \
|
|
|
|
--exclude-dir .git \
|
|
|
|
--exclude-dir .tox \
|
2017-03-02 20:36:46 +00:00
|
|
|
--exclude-dir .idea \
|
2016-12-14 00:39:03 +00:00
|
|
|
--exclude-dir docsite \
|
2017-03-02 20:36:46 +00:00
|
|
|
--exclude-dir results \
|
2016-12-14 00:39:03 +00:00
|
|
|
| grep -v \
|
2017-07-14 13:24:45 +00:00
|
|
|
-e 'metadata-.*.json:' \
|
|
|
|
-e lib/ansible.egg-info/ \
|
2017-03-23 20:35:05 +00:00
|
|
|
-e lib/ansible/module_utils/six/_six.py \
|
2017-07-14 13:24:45 +00:00
|
|
|
-e docs/docsite/rst/dev_guide/testing/sanity/ \
|
|
|
|
-e test/sanity/code-smell/no-dict-iterkeys.sh \
|
2016-12-14 00:39:03 +00:00
|
|
|
-e '^[^:]*:#'
|
|
|
|
)
|
|
|
|
|
|
|
|
if [ "${ITERKEYS_USERS}" ]; then
|
|
|
|
echo 'iterkeys has been removed in python3. Use "for KEY in DICT:" instead'
|
|
|
|
echo "${ITERKEYS_USERS}"
|
|
|
|
exit 1
|
|
|
|
fi
|