diff --git a/service/horizon.yaml b/service/horizon.yaml index 5270832..9c69f79 100644 --- a/service/horizon.yaml +++ b/service/horizon.yaml @@ -9,10 +9,10 @@ service: readiness: "true" liveness: "true" volumes: - - name: horizon-logs - path: "/var/log/ccp/horizon" - type: host - readOnly: False + - name: horizon-logs + path: "/var/log/ccp/horizon" + type: host + readOnly: False pre: - name: chown-logs-dir command: "sudo /bin/chown horizon:horizon /var/log/ccp/horizon" diff --git a/tools/run-check-yaml-syntax.sh b/tools/run-check-yaml-syntax.sh deleted file mode 100755 index e393c54..0000000 --- a/tools/run-check-yaml-syntax.sh +++ /dev/null @@ -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 diff --git a/tools/yamllint.sh b/tools/yamllint.sh new file mode 100755 index 0000000..6e84445 --- /dev/null +++ b/tools/yamllint.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -ex + +workdir=$(dirname $0) +yamllint -c $workdir/yamllint.yaml $(find . -not -path '*/\.*' -type f -name '*.yaml') diff --git a/tools/yamllint.yaml b/tools/yamllint.yaml new file mode 100644 index 0000000..6c2e4a7 --- /dev/null +++ b/tools/yamllint.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 diff --git a/tox.ini b/tox.ini index 7efb0df..b58791b 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ skipsdist = True [testenv:linters] deps = yamllint commands = - {toxinidir}/tools/run-check-yaml-syntax.sh + {toxinidir}/tools/yamllint.sh [testenv:bashate] deps = bashate>=0.2