#/bin/env bash
KNOWN_FEATURES=$(cat MAINTAINERS | sed -ne 's/^I:[[:space:]]*//p')
-FEATURES=$(git show -s --format=%s --no-color | sed -e 's/\(.*\):.*/\1/')
-KNOWN_TYPES="fix refactor style docs test make"
+FEATURES=$(git show -s --format=%s --no-color \
+ | sed -ne 's/^\([a-z0-9 -]*\):.*$/\1/p')
+KNOWN_TYPES="feature fix refactor style docs test make"
TYPE=$(git show -s --format=%b --no-color | sed -ne 's/^Type:[[:space:]]*//p')
ERR="=============================== ERROR ==============================="
echo "git commit 'Subject:' line must contain at least one known feature id."
echo "feature id(s) must be listed before ':' and space delimited "
echo "if more then one is listed."
- echo "Please reffer to MAINTAINERS file (I: lines) for known feature ids."
+ echo "Please refer to the MAINTAINERS file (I: lines) for known feature ids."
echo $ERR
exit 1
fi
if [ ${is_known} = "false" ] ; then
echo $ERR
echo "Unknown feature '${i}' in commit 'Subject:' line."
- echo "Feature must exist in MAINTAINERS file. If this commit intruduces "
- echo "new feature, then this commit must add new entry into the "
+ echo "Feature must exist in MAINTAINERS file. If this commit introduces "
+ echo "a new feature, then this commit must add an entry to the "
echo "MAINTAINERS file."
echo $ERR
exit 1
echo $ERR
exit 1
fi
-
+echo "*******************************************************************"
+echo "* VPP Commit Message Checkstyle Successfully Completed"
+echo "*******************************************************************"