From patchwork Fri Oct 25 09:59:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Morrissey X-Patchwork-Id: 61974 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9ECD31C2F1; Fri, 25 Oct 2019 12:00:41 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 577821D3F0 for ; Fri, 25 Oct 2019 12:00:40 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Oct 2019 03:00:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,228,1569308400"; d="scan'208";a="282219783" Received: from silpixa00389815.ir.intel.com (HELO silpixa00389815.ger.corp.intel.com) ([10.237.223.111]) by orsmga001.jf.intel.com with ESMTP; 25 Oct 2019 03:00:38 -0700 From: Sean Morrissey To: Thomas Monjalon Cc: dev@dpdk.org, Sean Morrissey Date: Fri, 25 Oct 2019 10:59:57 +0100 Message-Id: <20191025095957.29632-1-sean.morrissey@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [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" 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. Signed-off-by: Sean Morrissey Acked-by: Ferruh Yigit --- devtools/check-git-log.sh | 60 ++++++++------------------------ devtools/commit-title-syntax.txt | 45 ++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 45 deletions(-) create mode 100644 devtools/commit-title-syntax.txt diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh index a763ccf78..4152f6dfa 100755 --- a/devtools/check-git-log.sh +++ b/devtools/check-git-log.sh @@ -83,51 +83,21 @@ bad=$(echo "$headlines" | grep --color=always \ | sed 's,^,\t,') [ -z "$bad" ] || printf "Wrong headline uppercase:\n$bad\n" -# check headline uppercase (Rx/Tx, VF, L2, MAC, Linux, ARM...) -bad=$(echo "$headlines" | grep -E --color=always \ - -e ':.*\<(rx|tx|RX|TX)\>' \ - -e ':.*\<[pv]f\>' \ - -e ':.*\<[hsf]w\>' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\<(Aarch64|AArch64|AARCH64|Aarch32|AArch32|AARCH32)\>' \ - -e ':.*\<(Armv7|ARMv7|ArmV7|armV7|ARMV7)\>' \ - -e ':.*\<(Armv8|ARMv8|ArmV8|armV8|ARMV8)\>' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\' \ - -e ':.*\<[Vv]lan\>' \ - -e ':.*\' \ - -e ':.*\' \ - | grep \ - -v ':.*\' \ - | sed 's,^,\t,') -[ -z "$bad" ] || printf "Wrong headline lowercase:\n$bad\n" +# check headline case (Rx/Tx, VF, L2, MAC, Linux ...) +data="$selfdir/commit-title-syntax.txt" +while IFS= read -r line +do + regex=":.*\<$line\>" + bad=$(echo "$headlines" | grep -i $regex | grep \ + -v ':.*\' ) + 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" + fi +done < "$data" # special case check for VMDq to give good error message bad=$(echo "$headlines" | grep -E --color=always \ diff --git a/devtools/commit-title-syntax.txt b/devtools/commit-title-syntax.txt new file mode 100644 index 000000000..0d4b9af01 --- /dev/null +++ b/devtools/commit-title-syntax.txt @@ -0,0 +1,45 @@ +Rx +Tx +PF +VF +HW +SW +FW +L2 +L3 +L4 +API +arm +aarch64 +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 +VSI