From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id CBA3C376C for ; Tue, 11 Jul 2017 22:33:56 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 46CC32069B; Tue, 11 Jul 2017 16:33:56 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 11 Jul 2017 16:33:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=vX6CsGWAJzaOv0l 0VrVhJkkYxRi5w3jzeczYaXy7nPo=; b=QDJRYqb3233LO/1SIOB2JNwR140bhWz M9NGv9QhMLJ2o0xAT6Tvp71NJdo0kCWqFRnGXD0G85NOu5OP+T5zmobgiNwSrS/o URc4bLw+ybKeh+J9PGgk7cFDlUY58jaEX7W2p3NCK9p7ctENOvg3sJFZCDwev6DM ZOyNVPhQVTWI= 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-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=vX6CsGWAJzaOv0l0VrVhJkkYxRi5w3jzeczYaXy7nPo=; b=H32yHa3E DjlKwRLi4sdNudqej/QVdQIG1VTEu1Gqj+QdKvW3Zpbbns87vCqYtqpu8nFC8kgb W9w40NHCFyrhmqjFWCZWpg2xOtcsK0hRFk5+mwrmr5Zu+a483z6cf6w6mX1guP6s R8qSapKQv62ueoSAHSF/LL+FJ30jlMJSHCva75GiQqG798oO12CewjiMpj90QCEn s9HpvnZfoakfzn8fzZLhZ6fct0JraXLzaavZBAhzlL04wRKNe3daDWYJwo5KSg0h ydHrxP3q/ehcqOJi3bUuJbFvw1TdTPUiwCEcdbvXPBz4fJHre59kYupB21KE6JHc rE5qoZPHnxpSTA== X-ME-Sender: X-Sasl-enc: 3++brM4N6YOnmPOuwNZLEumCYBHYmRabedUm2HpmW/tZ 1499805235 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F167024038; Tue, 11 Jul 2017 16:33:55 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger Cc: dev@dpdk.org Date: Tue, 11 Jul 2017 22:33:55 +0200 Message-ID: <2203089.SAOtEojdoZ@xps> In-Reply-To: <20170711185546.26138-2-stephen@networkplumber.org> References: <20170711185546.26138-1-stephen@networkplumber.org> <20170711185546.26138-2-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 01/19] devtools: add simple script to find duplicate includes 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: , X-List-Received-Date: Tue, 11 Jul 2017 20:33:57 -0000 Hi Stephen, 11/07/2017 20:55, Stephen Hemminger: > This is just a simple check script to find obvious duplications. > > Signed-off-by: Stephen Hemminger > --- > devtools/dup_include.pl | 64 +++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 64 insertions(+) > create mode 100755 devtools/dup_include.pl Thank you for this script, but... it is written in Perl! I don't think it is a good idea to add yet another language to DPDK. We already have shell and python scripts. And I am not sure a lot of (young) people are able to parse it ;) I would like to propose this shell script: dirs='app buildtools drivers examples lib test' pattern='^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*' for file in $(git ls $dirs) ; do dups=$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d) [ -n "$dups" ] || continue echo "$file" echo "$dups" | sed 's,^,\t,' done