Yaml linter execution and config improved
Change-Id: I29c124f9c84f6d5c7efc77edc7c7a85e75392b15
This commit is contained in:
parent
15bcb96925
commit
548ad8ff87
|
@ -40,7 +40,6 @@
|
||||||
triggers:
|
triggers:
|
||||||
- zuul
|
- zuul
|
||||||
|
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
name: fuel-ccp-docs-build-jobs
|
name: fuel-ccp-docs-build-jobs
|
||||||
jobs:
|
jobs:
|
||||||
|
|
|
@ -12,4 +12,3 @@
|
||||||
global: true
|
global: true
|
||||||
triggers:
|
triggers:
|
||||||
- zuul
|
- zuul
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
branches:
|
branches:
|
||||||
- '{scm-branch}'
|
- '{scm-branch}'
|
||||||
|
|
||||||
|
|
||||||
- scm:
|
- scm:
|
||||||
name: zuul_repo
|
name: zuul_repo
|
||||||
scm:
|
scm:
|
||||||
|
@ -56,7 +55,6 @@
|
||||||
# Static repositories
|
# Static repositories
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# SSH credentials
|
# SSH credentials
|
||||||
#
|
#
|
||||||
|
@ -82,7 +80,7 @@
|
||||||
#
|
#
|
||||||
# Publishers
|
# Publishers
|
||||||
#
|
#
|
||||||
#TODO: check target fuel-ccp-ci
|
# TODO: check target fuel-ccp-ci
|
||||||
- publisher:
|
- publisher:
|
||||||
name: logs-public
|
name: logs-public
|
||||||
publishers:
|
publishers:
|
||||||
|
|
|
@ -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
|
4
tox.ini
4
tox.ini
|
@ -10,8 +10,10 @@ deps =
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
|
whitelist_externals =
|
||||||
|
bash
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/tools/run-check-yaml-syntax.sh
|
{toxinidir}/tools/yamllint.sh
|
||||||
# bashate check
|
# bashate check
|
||||||
bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -0 bashate -v -iE006"
|
bash -c "find {toxinidir} -type f -name '*.sh' -not -path '*/.tox/*' -print0 | xargs -0 bashate -v -iE006"
|
||||||
|
|
||||||
|
|
|
@ -161,4 +161,3 @@ projects:
|
||||||
periodic:
|
periodic:
|
||||||
- 'mcp-build-images-build-number'
|
- 'mcp-build-images-build-number'
|
||||||
- 'mcp-clean-docker-registry'
|
- 'mcp-clean-docker-registry'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue