2016-12-14 01:39:03 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
ITERKEYS_USERS=$(grep -r -I iterkeys . \
|
|
|
|
--exclude-dir .git \
|
|
|
|
--exclude-dir .tox \
|
2017-03-02 21:36:46 +01:00
|
|
|
--exclude-dir .idea \
|
2016-12-14 01:39:03 +01:00
|
|
|
--exclude-dir docsite \
|
2017-03-02 21:36:46 +01:00
|
|
|
--exclude-dir results \
|
2016-12-14 01:39:03 +01:00
|
|
|
| grep -v \
|
2017-07-14 15:24:45 +02:00
|
|
|
-e 'metadata-.*.json:' \
|
|
|
|
-e lib/ansible.egg-info/ \
|
2017-07-24 22:36:54 +02:00
|
|
|
-e lib/ansible/module_utils/six/__init__.py \
|
2017-07-14 15:24:45 +02:00
|
|
|
-e docs/docsite/rst/dev_guide/testing/sanity/ \
|
|
|
|
-e test/sanity/code-smell/no-dict-iterkeys.sh \
|
2016-12-14 01:39:03 +01: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
|