Files
ansible-freeipa/utils/lint_check.sh
Rafael Guterres Jeffman cef733eba2 covscan error[SC2068]: Fix unquoted array expansions.
error[SC2068]: Double quote array expansions to avoid re-splitting elements.
2020-12-09 13:13:52 -03:00

29 lines
556 B
Bash
Executable File

#!/bin/bash
topdir="`dirname $(dirname $0)`"
flake8 .
pydocstyle .
ANSIBLE_LIBRARY=${ANSIBLE_LIBRARY:-"${topdir}/plugins/modules"}
ANSIBLE_MODULE_UTILS=${ANSIBLE_MODULE_UTILS:-"${topdir}/plugins/module_utils"}
export ANSIBLE_LIBRARY ANSIBLE_MODULE_UTILS
yaml_dirs=(
"${topdir}/tests"
"${topdir}/playbooks"
"${topdir}/molecule"
)
for dir in "${yaml_dirs[@]}"
do
find "${dir}" -type f -name "*.yml" | xargs ansible-lint --force-color
done
for dir in "${yaml_dirs[@]}"
do
find "${dir}" -type f -name "*.yml" | xargs yamllint
done