Merge "Rework tox -e linters"

This commit is contained in:
Jenkins 2017-07-20 05:14:24 +00:00 committed by Gerrit Code Review
commit c327263467

10
tox.ini
View File

@ -28,14 +28,14 @@ setenv =
whitelist_externals = bash
commands =
flake8 {posargs}
# Ansible Syntax Check
bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -n1 -0 \
ansible-playbook --syntax-check -i tests/inventory 1>/dev/null"
# Ansible Lint Check
# NOTE(pabelanger): Ignore the following checks:
# ANSIBlE0012: Commands should not change things if nothing needs doing
bash -c "cd playbooks; find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
ansible-lint -x ANSIBLE0012"
# Ansible Syntax Check
bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print | xargs -t -n1 \
ansible-playbook --syntax-check -i tests/inventory > /dev/null"
bash -c "find playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -n1 -0 \
ansible-lint -x ANSIBLE0012 2> /dev/null"
[testenv:venv]
commands = {posargs}