1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-30 08:51:19 +01:00

Merge pull request #10142 from AaltoNEPPI/feature-travis-warning

dist/tools/commit-msg/check.sh: Enhance reporting
This commit is contained in:
Martine Lenders 2018-10-10 13:55:20 +02:00 committed by GitHub
commit 102f25b099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,11 +35,15 @@ ERROR="$(git log \
msg_length=$(echo "${msg}" | awk '{print length($0)}')
if [ ${msg_length} -gt ${MSG_MAX_LENGTH} ]; then
echo "Commit message is longer than ${MSG_MAX_LENGTH} characters:" >&2
echo " \"${msg}\"" >&2
if [ ${msg_length} -gt ${MSG_STRETCH_LENGTH} ]; then
MSG="Error: Commit message is longer than ${MSG_STRETCH_LENGTH} characters:"
echo "error"
else
MSG="Warning: Commit message is longer than ${MSG_MAX_LENGTH}"
MSG="${MSG} (but < ${MSG_STRETCH_LENGTH}) characters:"
fi
echo "${MSG}" >&2
echo " \"${msg}\"" >&2
fi
done)"