Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
stats: expose symlink to stats client
[vpp.git]
/
extras
/
scripts
/
check_commit_msg.sh
diff --git
a/extras/scripts/check_commit_msg.sh
b/extras/scripts/check_commit_msg.sh
index
ec9db60
..
6869fbf
100755
(executable)
--- a/
extras/scripts/check_commit_msg.sh
+++ b/
extras/scripts/check_commit_msg.sh
@@
-1,8
+1,9
@@
#/bin/env bash
KNOWN_FEATURES=$(cat MAINTAINERS | sed -ne 's/^I:[[:space:]]*//p')
#/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 improvement style docs test make"
TYPE=$(git show -s --format=%b --no-color | sed -ne 's/^Type:[[:space:]]*//p')
ERR="=============================== ERROR ==============================="
TYPE=$(git show -s --format=%b --no-color | sed -ne 's/^Type:[[:space:]]*//p')
ERR="=============================== ERROR ==============================="
@@
-12,7
+13,7
@@
if [ $(echo ${FEATURES} | wc -w) -eq 0 ]; then
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 "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 ref
fer to
MAINTAINERS file (I: lines) for known feature ids."
+ echo "Please ref
er to the
MAINTAINERS file (I: lines) for known feature ids."
echo $ERR
exit 1
fi
echo $ERR
exit 1
fi
@@
-26,8
+27,8
@@
for i in ${FEATURES}; do
if [ ${is_known} = "false" ] ; then
echo $ERR
echo "Unknown feature '${i}' in commit 'Subject:' line."
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 intr
u
duces "
- echo "
new feature, then this commit must add new entry in
to the "
+ echo "Feature must exist in MAINTAINERS file. If this commit intr
o
duces "
+ echo "
a new feature, then this commit must add an entry
to the "
echo "MAINTAINERS file."
echo $ERR
exit 1
echo "MAINTAINERS file."
echo $ERR
exit 1
@@
-47,4
+48,6
@@
if [ ${is_known} = "false" ] ; then
echo $ERR
exit 1
fi
echo $ERR
exit 1
fi
-
+echo "*******************************************************************"
+echo "* VPP Commit Message Checkstyle Successfully Completed"
+echo "*******************************************************************"