mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-06 21:33:14 +00:00
The script utils/lint_check.sh should be used before push commits to the repository. This change enables pylint to be executed by the script.
30 lines
570 B
Bash
Executable File
30 lines
570 B
Bash
Executable File
#!/bin/bash
|
|
|
|
topdir="`dirname $(dirname $0)`"
|
|
|
|
flake8 .
|
|
pydocstyle .
|
|
pylint plugins
|
|
|
|
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
|