add wrapper for yamllint

We don't need to run the linter over every single old deliverable file
every time. Just check the "modern" series that are most likely to
be open, and the _independent projects.

Change-Id: I5207600838c37b241d0ab178080be75a8f31a725
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-07-31 15:12:23 -04:00
parent 0bb989b98c
commit 8477f4fde9
2 changed files with 14 additions and 1 deletions

13
tools/run_yamllint.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash -x
#
# Wrapper around yamllint that only looks at recent branches to avoid
# us having to reformat really old deliverable files.
bindir=$(dirname $0)
topdir=$(dirname $bindir)
# determine the 3 most recent series, since those are most likely to
# still be open
series=$(ls -1d deliverables/* | tail -n 3)
yamllint -f parsable -c $topdir/yamllint.yml $series deliverables/_independent

View File

@ -19,7 +19,7 @@ commands =
deps =
yamllint==1.4.1
commands =
yamllint -f parsable -c {toxinidir}/yamllint.yml deliverables
{toxinidir}/tools/run_yamllint.sh
validate-request {posargs}
[testenv:list-changes]