From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 4DDE06CAE for ; Wed, 6 Jul 2016 12:39:02 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id r201so186988930wme.1 for ; Wed, 06 Jul 2016 03:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=jmBeKhLOj6MhFC19+pnRP1Cfvvv2o8YAIPTy7ISo9Ek=; b=pVpuL2r24W0Z+bkBimrFqnuIZnlm00YPO7jKVaVuVv+scADv5j+xOkhU8u/OxJxilf L7kdPB44fCAZFDMUt38Qtmf7nBsHc6HWluTA9caI5Q7ROMCwcY7t1+QEfqQ+6SuwxJfX XSsv1C/6t5OgUww7Kr74KexZiv9kysvN/WU1y4uWxZhLNQJ2YimyUVb3lwBog+qJI4AC CE7gddWsYvxis9mkvAdA9HaEw3z0LCDEqS+tSsEg+ZgUy6qkc5l5M0kr9eg2COT4Utkz n0nc/1z9d7iw3l3DnxDDKKBJDgVfmZkW7OnykouGRVPIVN1u4wA/vnlBMr4g4YaQEKD2 iAhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=jmBeKhLOj6MhFC19+pnRP1Cfvvv2o8YAIPTy7ISo9Ek=; b=arBkkFHB27RQVTXSX96PkkvGxmt3I++Xm80Aw94WHM3qbRjeAYcJYDtu0YWdLpZGLE mndCOz3K6/McwX7Wf0zVw9Wbr1t4Nn/ImST97RYz6PEL28B8FCnhqpCMY/JA3LKDCwDf NB/EJK4nCkZqItQrQ594jfO7YEW9MwyQDn1zHFPTQjPdJMx7xq+DXFhJXUJJPGdGMJbG Q4ETCbcEdyovmSLIU+VFEx1EVflzBGHQ3p6ye53Kickqd5Dxrx/oz5jRUGeo1dCY8heE fiQmj38fxyTmK5B5b3XpWnyFeR9mMiGeepC2VmvMftw1v0+p4ewXBwv1rqyBoLtuFHs9 16SQ== X-Gm-Message-State: ALyK8tKIfea8X6U3KRQNb9Vi9qvaooXNKe2LPS1ZWzE2QjaLJrDYNJubM0RYoF5QH0/+KHHv X-Received: by 10.28.215.139 with SMTP id o133mr20061478wmg.74.1467801541914; Wed, 06 Jul 2016 03:39:01 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id x194sm3381094wmf.13.2016.07.06.03.39.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Jul 2016 03:39:01 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 6 Jul 2016 12:38:49 +0200 Message-Id: <1467801530-20800-3-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1467801530-20800-1-git-send-email-thomas.monjalon@6wind.com> References: <1467801530-20800-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH 2/3] scripts: reduce line size of commit checks X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2016 10:39:02 -0000 Small cleanup to comply with the 80 chars limit. Signed-off-by: Thomas Monjalon --- scripts/check-git-log.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/check-git-log.sh b/scripts/check-git-log.sh index a24f101..833aa39 100755 --- a/scripts/check-git-log.sh +++ b/scripts/check-git-log.sh @@ -52,8 +52,9 @@ range=${1:-origin/master..} commits=$(git log --format='%h' $range) headlines=$(git log --format='%s' $range) bodylines=$(git log --format='%b' $range) -tags=$(git log --format='%b' $range | grep -i -e 'by *:' -e 'fix.*:') fixes=$(git log --format='%h %s' $range | grep -i ': *fix' | cut -d' ' -f1) +tags=$(git log --format='%b' $range | grep -i -e 'by *:' -e 'fix.*:') +bytag='\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by:' # check headline format (spacing, no punctuation, no code) bad=$(echo "$headlines" | grep --color=always \ @@ -108,11 +109,15 @@ bad=$(echo "$headlines" | grep -E --color=always \ [ -z "$bad" ] || printf "Wrong headline lowercase:\n$bad\n" # check headline length (60 max) -bad=$(echo "$headlines" | awk 'length>60 {print}' | sed 's,^,\t,') +bad=$(echo "$headlines" | + awk 'length>60 {print}' | + sed 's,^,\t,') [ -z "$bad" ] || printf "Headline too long:\n$bad\n" # check body lines length (75 max) -bad=$(echo "$bodylines" | grep -v '^Fixes:' | awk 'length>75 {print}' | sed 's,^,\t,') +bad=$(echo "$bodylines" | grep -v '^Fixes:' | + awk 'length>75 {print}' | + sed 's,^,\t,') [ -z "$bad" ] || printf "Line too long:\n$bad\n" # check starting commit message with "It" @@ -124,7 +129,7 @@ done | sed 's,^,\t,') # check tags spelling bad=$(echo "$tags" | - grep -v '^\(Reported\|Suggested\|Signed-off\|Acked\|Reviewed\|Tested\)-by: [^,]* <.*@.*>$' | + grep -v "^$bytag [^,]* <.*@.*>$" | grep -v '^Fixes: [0-9a-f]\{7\}[0-9a-f]* (".*")$' | sed 's,^.,\t&,') [ -z "$bad" ] || printf "Wrong tag:\n$bad\n" -- 2.7.0