linters: lint that library files don't start with #!
See notes in I4e6e85156459cca032e6c3e1d8a9284be919ccca, this ensures the library files don't start with #! so they will run under the Ansible interpeter on the remote node. Change-Id: I8754d0962e8453d2030c589be23560e454e0052e
This commit is contained in:
parent
9e22cfdb0f
commit
66345d0ab7
1
tox.ini
1
tox.ini
@ -46,6 +46,7 @@ deps =
|
|||||||
-r{toxinidir}/linters-requirements.txt
|
-r{toxinidir}/linters-requirements.txt
|
||||||
|
|
||||||
commands =
|
commands =
|
||||||
|
bash -c "for f in $(find . -path './roles/*/library/*.py' | xargs); do echo Checking shebang on $f; if head -1 $f | grep -q '^#!'; then echo $f 'starts with #!, it should not as Ansible will choose the interpreter'; exit 1; fi; done"
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
yamllint -s -f parsable .
|
yamllint -s -f parsable .
|
||||||
python -m ansiblelint --version
|
python -m ansiblelint --version
|
||||||
|
Loading…
Reference in New Issue
Block a user