Add linter and bashate tox checks
For correct job succeed need to add tox checkers. Change-Id: I725079819fc00c12da62389142a2b627e8352761
This commit is contained in:
parent
64127fe907
commit
3dd3071107
|
@ -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
|
|
@ -0,0 +1,17 @@
|
|||
[tox]
|
||||
minversion = 1.6
|
||||
envlist = linters,bashate
|
||||
skipsdist = True
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:linters]
|
||||
deps = yamllint
|
||||
commands =
|
||||
{toxinidir}/tools/yamllint.sh
|
||||
|
||||
[testenv:bashate]
|
||||
deps = bashate>=0.2
|
||||
whitelist_externals = bash
|
||||
commands = bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -0 bashate -v"
|
Loading…
Reference in New Issue