*: add missing license headers + check

This commit is contained in:
Jonathan Boulle
2016-04-01 15:35:21 +02:00
parent 0046767be7
commit f6135c7ba3
16 changed files with 222 additions and 0 deletions

12
test
View File

@ -65,4 +65,16 @@ if [ -n "${vetRes}" ]; then
exit 255
fi
echo "Checking license header..."
licRes=$(
for file in $(find . -type f -iname '*.go' ! -path './vendor/*'); do
head -n1 "${file}" | grep -Eq "(Copyright|generated)" || echo -e " ${file}"
done
)
if [ -n "${licRes}" ]; then
echo -e "license header checking failed:\n${licRes}"
exit 255
fi
echo "Success"