Reduce the scope of yamllints coverage
Since I76bc62ef22d09e1b6c19ebcd9b12f6381e1fd2db the non-voting linters target has been failign as it was also checking yaml files in the virtualenvs created by tox [1]. This change modifies the way we invoke yamllint so that only files we actually care about are linted. We also configure yamllint to have a slight more generous line-length limit and to disable the 'truthy'[2] rule. [1] http://logs.openstack.org/10/382110/2/check/gate-governance-linters-ubuntu-xenial/6c8ae21/console.html#_2016-10-11_15_39_52_575891 [2] https://yamllint.readthedocs.io/en/latest/rules.html#module-yamllint.rules.truthy Change-Id: Ia0337aa49efb9ec832356eed374cc56bac1e75bc
This commit is contained in:
8
.yamllint
Normal file
8
.yamllint
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
rules:
|
||||||
|
line-length:
|
||||||
|
# Allow some of our longer URLs
|
||||||
|
max: 90
|
||||||
|
allow-non-breakable-words: yes # Default
|
||||||
|
allow-non-breakable-inline-mappings: no # Default
|
||||||
|
truthy: disable
|
6
tox.ini
6
tox.ini
@@ -10,7 +10,11 @@ setenv = VIRTUAL_ENV={envdir}
|
|||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
commands = yamllint .
|
whitelist_externals = bash
|
||||||
|
commands = bash -c "find {toxinidir} \
|
||||||
|
\( -name .tox -prune \) \
|
||||||
|
-o -type f -name '*.yaml' \
|
||||||
|
-print0 | xargs -0 yamllint"
|
||||||
{toxinidir}/tools/check_projects_yaml_alphabetized.sh
|
{toxinidir}/tools/check_projects_yaml_alphabetized.sh
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
|
Reference in New Issue
Block a user