From 734e937179eae9bb0b75ae3d1f4611be9381d1cb Mon Sep 17 00:00:00 2001 From: jyates Date: Thu, 1 Aug 2013 18:43:42 +0000 Subject: [PATCH] HBASE-9103: Print lines that are longer than allowed in HadoopQA output. git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1509381 13f79535-47bb-0310-9956-ffa450edef68 --- dev-support/test-patch.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dev-support/test-patch.sh b/dev-support/test-patch.sh index e1d72691c8e..5d73cd534a9 100755 --- a/dev-support/test-patch.sh +++ b/dev-support/test-patch.sh @@ -631,12 +631,15 @@ checkLineLengths () { echo "" #see http://en.wikipedia.org/wiki/Diff#Unified_format - ll=`cat $PATCH_DIR/patch | grep "^+" | grep -v "^@@" | grep -v "^+++" | grep -v "import" | wc -L` MAX_LINE_LENGTH_PATCH=`expr $MAX_LINE_LENGTH + 1` + lines=`cat $PATCH_DIR/patch | grep "^+" | grep -v "^@@" | grep -v "^+++" | grep -v "import" | awk -v len="$MAX_LINE_LENGTH_PATCH" 'length ($0) > len' + ll=`echo "$lines" | wc -l` if [[ "$ll" -gt "$MAX_LINE_LENGTH_PATCH" ]]; then JIRA_COMMENT="$JIRA_COMMENT - {color:red}-1 lineLengths{color}. The patch introduces lines longer than $MAX_LINE_LENGTH" + {color:red}-1 lineLengths{color}. The patch introduces the following lines longer than $MAX_LINE_LENGTH: + $lines" + return 1 fi JIRA_COMMENT="$JIRA_COMMENT