summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2020-05-08 09:46:17 -0400
committerDave Wallace <dwallacelf@gmail.com>2020-05-09 00:27:35 +0000
commit119286ee5280757ba37985097f29337a3c8cf959 (patch)
treef85093443a3a471bdcb9682f31f717a117aea6c2
parent992109169038ade2755d50c20caa7cab8eb41449 (diff)
build: reject merge conflict checkin attempts
Although attempts to build code containing merge conflict markers USUALLY results in compile errors, this patch adds an explicit check for the conflict end marker. If for some unknown reason it's necessary to check in the text '>>>>>>>', construct it by concatenation: ">>>"">>>>" or '>>>' + '>>>>' depending on the language involved. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Iaad2aa8b87a71137a3bb9a09f7f4159909bf79ab
-rwxr-xr-xbuild-root/scripts/checkstyle.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/build-root/scripts/checkstyle.sh b/build-root/scripts/checkstyle.sh
index f2f118ca20d..58f67154114 100755
--- a/build-root/scripts/checkstyle.sh
+++ b/build-root/scripts/checkstyle.sh
@@ -72,6 +72,11 @@ cd ${VPP_DIR}
git status
for i in ${FILELIST}; do
if [ -f ${i} ] && [ ${i} != "build-root/scripts/checkstyle.sh" ] && [ ${i} != "extras/emacs/fix-coding-style.el" ]; then
+ grep -q '>>>>>>>' ${i}
+ if [ $? == 0 ]; then
+ echo "Unresolved merge conflict detected in" ${i} "... Abort."
+ exit 1
+ fi
grep -q "fd.io coding-style-patch-verification: ON" ${i}
if [ $? == 0 ]; then
EXTENSION=`basename ${i} | sed 's/^\w\+.//'`