From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C43B6A0558; Sat, 22 Feb 2020 21:38:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 969FF25B3; Sat, 22 Feb 2020 21:38:29 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by dpdk.org (Postfix) with ESMTP id EA243B62 for ; Sat, 22 Feb 2020 21:38:27 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id D3F52602; Sat, 22 Feb 2020 15:38:26 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 22 Feb 2020 15:38:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=VKQNclz/X7VoUU7xyUY8gYfzgebnL2j2OJHztnWtZTk=; b=fUHLJYMlHtoM xPgFOoiRyJHinV6wRUtlyLrmEXJ9buhe5Th8dDl0mSGQ0gWpbJeanODQmc5o7pp4 8ks8qX9V7f7K3Ggde4v1NzbFl3NMnaBdVh58ZwD8zJUDNF8SQ1QxI4ZGPuR0koz9 eRPjHcWLpesAlDwEZ5cr+G/I1RRM3I8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=VKQNclz/X7VoUU7xyUY8gYfzgebnL2j2OJHztnWtZ Tk=; b=g0BetlH26vlftuGBknleXs6W18sJ56+uqpwhGb+GpjM/e+cRh2RLzshLm 0o2euZ2KWiNGuTeNqG9pLXmbmKdC5oPRxKu+BAQNfv/TKeFReE4O/LQHYfF1jCsE SLGIZxw8Tdr3b5HDrCbvw83m9wpPkcGu2H20LciotIV02gRR4x18/TZ9O6iIqaPK C47o+7MpspPFX0FrxqUQMR9ZuCTLVw7ZKWlXj5SYx35pSbhkIqz1xviMT9VyB7KR ySv7Cx+TF8ZUzJnoJ4bS0kXjK8mFy8pvzSSDmlTaSJoAQkMxX6lzSrQg6/zD49T5 sPADxp8ijyy0JaM+Hk3J7IHdzNGdA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrkeeigddugedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuff homhgrihhnpeguphgukhdrohhrghenucfkphepjeejrddufeegrddvtdefrddukeegnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrg hssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 63E1B3060BE4; Sat, 22 Feb 2020 15:38:25 -0500 (EST) From: Thomas Monjalon To: Sean Morrissey Cc: dev@dpdk.org, ferruh.yigit@intel.com Date: Sat, 22 Feb 2020 21:38:24 +0100 Message-ID: <2936890.fEcJ0Lxnt5@xps> In-Reply-To: <20191025095957.29632-1-sean.morrissey@intel.com> References: <20191025095957.29632-1-sean.morrissey@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] devtools: export title syntax for check-git-log X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 [...] > +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 ':.*\' ) 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