Commit 16ba8351 authored by Martin Storsjö's avatar Martin Storsjö Committed by Jean-Baptiste Kempf

ci: Check the style of commit messages

Check all commits, not just the latest one, as a branch may consist
of multiple commits. Exclude commits from upstream master (which
may contain issues which we want to error out for on new commits).
parent 466b524b
......@@ -11,7 +11,19 @@ style-check:
- amd64
script:
- git grep -n -e $'\t' --or -e $'\r' -- . ':(exclude)*/compat/*' && exit 1
- /bin/true
- git remote add upstream https://code.videolan.org/videolan/dav1d.git && git fetch -q upstream master
- for i in $(git rev-list HEAD ^upstream/master); do
echo "Checking commit message of $i";
msg="$(git log --format=%B -n 1 $i)";
if [ -n "$(echo "$msg" | awk "NR==2")" ]; then
echo "Malformed commit message in $i, second line must be empty";
exit 1;
fi;
if echo "$msg" | head -1 | grep -q '\.$'; then
echo "Malformed commit message in $i, trailing period in subject line";
exit 1;
fi;
done
build-debian:
image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment