DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: stable@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
	Sean Morrissey <sean.morrissey@intel.com>
Subject: [dpdk-dev] [PATCH] devtools: fix letter case check in commit title
Date: Mon, 18 Oct 2021 11:55:58 +0200	[thread overview]
Message-ID: <20211018095558.354074-1-thomas@monjalon.net> (raw)

The prefix (before the colon) of the title is lowercase.
The check of uppercase/lowercase in the commit title
was supposed to apply after the colon,
but some greps were not limited to the exact word.
So in the case of "test/dma: add basic dmadev instance tests",
the lowercase word "dmadev" was wrongly suggested to be uppercase.

The words of the dictionary must be filtered as whole word
with the grep option -w.

Fixes: d448efa259e9 ("devtools: export dictionary for commit title check")
Cc: stable@dpdk.org

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 devtools/check-git-log.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh
index 9988bf863d..885d444b3d 100755
--- a/devtools/check-git-log.sh
+++ b/devtools/check-git-log.sh
@@ -111,12 +111,12 @@ IFS='
 '
 words="$selfdir/words-case.txt"
 for word in $(cat $words); do
-	bad=$(echo "$headlines" | grep -iw $word | grep -v $word)
+	bad=$(echo "$headlines" | grep -iw $word | grep -vw $word)
 	if [ "$word" = "Tx" ]; then
 		bad=$(echo $bad | grep -v 'OCTEON\ TX')
 	fi
 	for bad_line in $bad; do
-		bad_word=$(echo $bad_line | cut -d":" -f2 | grep -io $word)
+		bad_word=$(echo $bad_line | cut -d":" -f2 | grep -iwo $word)
 		[ -z "$bad_word" ] || { printf "Wrong headline case:\n\
 			\"$bad_line\": $bad_word --> $word\n" && failure=true;}
 	done
-- 
2.33.0


             reply	other threads:[~2021-10-18  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18  9:55 Thomas Monjalon [this message]
2021-10-22 18:04 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211018095558.354074-1-thomas@monjalon.net \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=sean.morrissey@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).