mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-03-26 21:33:05 +00:00
The scprit `lint_check.sh` under utils runs the same linters as the Github Actions, with the same configuration. The changes on setup.cfg are required if flake8-docstrings is used, so its output is the same as pydocstlye.
26 lines
576 B
Bash
Executable File
26 lines
576 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/*.yml"
|
|
"${topdir}/tests/*/*.yml"
|
|
"${topdir}/tests/*/*/*.yml"
|
|
"${topdir}/playbooks/*.yml"
|
|
"${topdir}/playbooks/*/*.yml"
|
|
"${topdir}/molecule/*/*.yml"
|
|
"${topdir}/molecule/*/*/*.yml"
|
|
)
|
|
|
|
ansible-lint --force-color ${yaml_dirs[@]}
|
|
|
|
yamllint -f colored ${yaml_dirs[@]}
|