Yaml linter execution and config improved
Change-Id: Ie4aedfb4f4a76d20f0d0432fe6c3a4665501e167
This commit is contained in:
parent
0a998b1dd4
commit
1abcb7293d
|
@ -1,3 +1,4 @@
|
||||||
|
# yamllint disable
|
||||||
service:
|
service:
|
||||||
name: {{ service_name }}
|
name: {{ service_name }}
|
||||||
ports:
|
ports:
|
||||||
|
@ -66,3 +67,4 @@ files:
|
||||||
wsgi-{{ service_name }}-conf:
|
wsgi-{{ service_name }}-conf:
|
||||||
path: /etc/apache2/conf-enabled/wsgi-{{ service_name }}.conf
|
path: /etc/apache2/conf-enabled/wsgi-{{ service_name }}.conf
|
||||||
content: wsgi-{{ service_name }}.conf.j2
|
content: wsgi-{{ service_name }}.conf.j2
|
||||||
|
# yamllint enable
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
workdir=$(dirname $0)
|
||||||
|
yamllint -c $workdir/yamllint.yaml $(find . -not -path '*/\.*' -type f -name '*.yaml')
|
|
@ -0,0 +1,21 @@
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
braces:
|
||||||
|
max-spaces-inside: 1
|
||||||
|
comments:
|
||||||
|
level: error
|
||||||
|
comments-indentation:
|
||||||
|
level: warning
|
||||||
|
document-end:
|
||||||
|
present: no
|
||||||
|
document-start:
|
||||||
|
level: error
|
||||||
|
present: no
|
||||||
|
empty-lines:
|
||||||
|
max: 1
|
||||||
|
max-start: 0
|
||||||
|
max-end: 0
|
||||||
|
line-length:
|
||||||
|
level: warning
|
||||||
|
max: 120
|
4
tox.ini
4
tox.ini
|
@ -19,6 +19,10 @@ commands =
|
||||||
bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -exec bashate -v \{\} \;"
|
bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -exec bashate -v \{\} \;"
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
deps = yamllint
|
||||||
|
commands = {toxinidir}/tools/yamllint.sh
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue