DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Ferruh Yigit <ferruh.yigit@intel.com>,
	Sean Morrissey <sean.morrissey@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] devtools: export title syntax data for check-git-log
Date: Tue, 25 Feb 2020 21:24:27 +0100	[thread overview]
Message-ID: <43963916.XUcTiDjVJD@xps> (raw)
In-Reply-To: <20200224153001.3941073-1-ferruh.yigit@intel.com>

24/02/2020 16:30, Ferruh Yigit:
> From: Sean Morrissey <sean.morrissey@intel.com>
> 
> Moved title syntax to a separate file so that it improves code
> readability and allows easy addition.
> 
> Also logic changed from checking for bad pattern to checking good
> pattern which documents the expected syntax more clearly, and does not
> have gaps in the checks.
> 
> Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> +words="$selfdir/words-case.txt"
> +for word in $(cat $words); do

I think we should exclude comments in the words file.

> +	bad=$(echo "$headlines" | grep -iw $word | grep -v $word)
> +	if [ "$word" = "Tx" ]; then
> +		bad=$(echo $bad | grep -v 'OCTEON\ TX')
> +	fi

We could try to manage such false positive automatically by excluding
valid patterns while patterns list is iterated.
If OCTEON TX is before Tx in the list, no confusion is possible.

> +	for bad_line in $bad; do
> +		bad_word=$(echo $bad_line | cut -d":" -f2 | grep -io $word)

The cut will ignore anything after a second colon.
Should not happen but a possible minor issue.

> +		if [ -n "$bad_word" ]; then
> +			printf "Wrong headline case:\n\"$bad_line\": $bad_word --> $word\n"
> +		fi
> +	done
> +done

I think it is good enough to be merged.
We can adress above improvements in a separate patch.

Applied, thanks



      reply	other threads:[~2020-02-25 20:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:59 [dpdk-dev] [PATCH] devtools: export title syntax " Sean Morrissey
2019-10-25 13:44 ` Ferruh Yigit
2020-02-22 20:38 ` Thomas Monjalon
2020-02-24 12:02 ` [dpdk-dev] [PATCH v2] devtools: export title syntax data " Ferruh Yigit
2020-02-24 13:39   ` Thomas Monjalon
2020-02-24 14:38     ` Ferruh Yigit
2020-02-24 15:30   ` [dpdk-dev] [PATCH v3] " Ferruh Yigit
2020-02-25 20:24     ` Thomas Monjalon [this message]

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=43963916.XUcTiDjVJD@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=sean.morrissey@intel.com \
    /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).