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

Hi,

Sorry for not looking at this patch before.

25/10/2019 11:59, Sean Morrissey:
> Moved title syntax to a separate file so that it improves code readability
> and allows for easy addition of new correct title syntax in future cases.

I think it is a good idea for a reason which is not said here:
the logic is switched from checking bad patterns to checking good wording.

> Signed-off-by: Sean Morrissey <sean.morrissey@intel.com>
[...]
> +data="$selfdir/commit-title-syntax.txt"

The file is processed to check specifically the case of words,
so it should be renamed to something like words-case.txt
The file need to be added to MAINTAINERS file as well.

The variable name "data" is too vague. I suggest "words".

> +while IFS= read -r line

We should avoid "while" loop because it is a sub-shell,
so it forbids setting global variables as it is done
in another patch collecting stats:
	https://patches.dpdk.org/patch/65243/

"for" loop should be fine.

The variable name should be "word" I think.

> +do
> +	regex=":.*\<$line\>"
> +	bad=$(echo "$headlines" | grep -i $regex | grep \

If using -o option of grep, we can capture the word and compare directly
with the correct word. It will be also better when printing the error.

> +		-v ':.*\<OCTEON\ TX\>' )

I don't like having this exception but I have no better idea.
We can move it before the first grep so it will still work with grep -o.

> +	if ! [ -z "$bad" ]
> +	then
> +		bad=$(echo "$headlines" | grep --color=always -v $regex \
> +			| grep --color=always -i $regex \
> +			| sed 's,^,\t,')
> +		[ -z "$bad" ] || printf "Wrong headline case:\n$bad\n"

As said above, the word can be printed alone if using grep -o.

> +	fi
> +done < "$data"
>  
>  # special case check for VMDq to give good error message
>  bad=$(echo "$headlines" | grep -E --color=always \

The VMDq case should be moved as well.

> --- /dev/null
> +++ b/devtools/commit-title-syntax.txt
> @@ -0,0 +1,45 @@
> +Rx
> +Tx
> +PF
> +VF
> +HW
> +SW
> +FW
> +L2
> +L3
> +L4
> +API
> +arm

The right syntax is Arm.

> +aarch64

aarch32 is missing.

> +armv7
> +armv8
> +CRC
> +DCB
> +DMA
> +EEPROM
> +FreeBSD
> +IOVA
> +LACP
> +Linux
> +LRO
> +LSC
> +MAC
> +MSS
> +MTU
> +NIC
> +NVM
> +NUMA
> +PCI
> +PHY
> +PMD
> +RETA
> +RSS
> +SCTP
> +TOS
> +TPID
> +TSO
> +TTL
> +UDP
> +VLAN
> +VDPA

The right syntax is vDPA

> +VSI



  parent reply	other threads:[~2020-02-22 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:59 Sean Morrissey
2019-10-25 13:44 ` Ferruh Yigit
2020-02-22 20:38 ` Thomas Monjalon [this message]
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

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=2936890.fEcJ0Lxnt5@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).