Yaml linter execution and config improved
Change-Id: I22586f1faf4f196754d14cf748027dfe6c9024a4
This commit is contained in:
parent
a9522e4050
commit
30ad00a98b
|
@ -1,7 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
### Temp yaml syntax checker script.
|
||||
set -e
|
||||
for file in $(find . -name '*.yaml'); do
|
||||
yamllint -d relaxed $file
|
||||
done
|
|
@ -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
|
2
tox.ini
2
tox.ini
|
@ -6,7 +6,7 @@ envlist = linters,bashate
|
|||
[testenv:linters]
|
||||
deps = yamllint
|
||||
commands =
|
||||
{toxinidir}/tools/run-check-yaml-syntax.sh
|
||||
{toxinidir}/tools/yamllint.sh
|
||||
|
||||
[testenv:bashate]
|
||||
commands = bash -c "exit 0"
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
[tox]
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
envlist = linters,bashate
|
||||
|
||||
[testenv:linters]
|
||||
deps = yamllint
|
||||
commands =
|
||||
{toxinidir}/tools/yamllint.sh
|
||||
|
||||
[testenv:bashate]
|
||||
commands = bash -c "exit 0"
|
||||
|
||||
[testenv:py27]
|
||||
deps =
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
changedir={toxinidir}/tests
|
||||
commands =
|
||||
py.test -vv {posargs}
|
Loading…
Reference in New Issue