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:
parent
27b1178ccd
commit
d58f4b10f8
19
tools/run_specchecks.sh
Executable file
19
tools/run_specchecks.sh
Executable 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
|
1
tox.ini
1
tox.ini
@ -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]
|
||||||
|
Loading…
Reference in New Issue
Block a user