912d6ed8cc
- Replace find ';' with '+' for faster execution. - Replace grep -R with -r to avoid recursive warnings. - Exclude .git and .tox directories from recursive grep. - Improve messaging on failed sanity checks. - Add no-basestring check to Shippable.
18 lines
401 B
Bash
Executable file
18 lines
401 B
Bash
Executable file
#!/bin/sh
|
|
|
|
BASESTRING_USERS=$(grep -r basestring . \
|
|
--exclude-dir .git \
|
|
--exclude-dir .tox \
|
|
| grep isinstance \
|
|
| grep -v \
|
|
-e lib/ansible/compat/six/_six.py \
|
|
-e lib/ansible/module_utils/six.py \
|
|
-e lib/ansible/modules/core/ \
|
|
-e lib/ansible/modules/extras/ \
|
|
-e '^[^:]*:#'
|
|
)
|
|
|
|
if [ "${BASESTRING_USERS}" ]; then
|
|
echo "${BASESTRING_USERS}"
|
|
exit 1
|
|
fi
|