Some small shell script check for common review violations

This should probably be a lot more advanced, but for now
this finds the problem that I introduce all the time :)

Depends-on: I87a9de05f15b3dd1f3d5fb9c6b77c09d265b28ad
Change-Id: I9c1815a077c2fd918a35b44081bccdd1ccd8afc2
This commit is contained in:
Dirk Mueller 2016-10-13 15:44:59 +02:00
parent 27b1178ccd
commit d58f4b10f8
2 changed files with 20 additions and 0 deletions

19
tools/run_specchecks.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
set -e
basedir=${1:-$PWD}
WORKSPACE=${WORKSPACE:-$basedir}
echo "run checks over specfiles from $WORKSPACE/logs/"
failed=0
for spec in $WORKSPACE/logs/*.suse ; do
egrep -q '^Source:' $spec && {
echo "$spec should not have Source: lines. Please use Source0: instead."
failed=1
}
done
exit $failed

View File

@ -12,6 +12,7 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:lint] [testenv:lint]
commands = commands =
{toxinidir}/tools/run_renderspec.sh {toxinidir} {toxinidir}/tools/run_renderspec.sh {toxinidir}
{toxinidir}/tools/run_specchecks.sh {toxinidir}
{toxinidir}/tools/run_speccleaner.sh {toxinidir} {toxinidir}/tools/run_speccleaner.sh {toxinidir}
[testenv:venv] [testenv:venv]