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
This commit is contained in:
parent
9ab34a7dd7
commit
734e937179
|
@ -631,12 +631,15 @@ checkLineLengths () {
|
||||||
echo ""
|
echo ""
|
||||||
#see http://en.wikipedia.org/wiki/Diff#Unified_format
|
#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`
|
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
|
if [[ "$ll" -gt "$MAX_LINE_LENGTH_PATCH" ]]; then
|
||||||
JIRA_COMMENT="$JIRA_COMMENT
|
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
|
return 1
|
||||||
fi
|
fi
|
||||||
JIRA_COMMENT="$JIRA_COMMENT
|
JIRA_COMMENT="$JIRA_COMMENT
|
||||||
|
|
Loading…
Reference in New Issue