From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id AB1C229CB for ; Thu, 13 Jul 2017 14:36:47 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 48F19207AB; Thu, 13 Jul 2017 08:36:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 13 Jul 2017 08:36:47 -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=8M5ID6p81lujtOh VvMpepDaHd2Rb6x3wtFhlk+nEX4A=; b=nPjoU6RsNsNmU4zKRHCGPxvNwDdRmBH ywCCQdSwxlDw9wpXryDwyxakXLhgbN7NtPmTT8asEHHrdis6N+ih/DSMBnE2rOge 3XMGetzXFFENkEM3/0k6zhvIJbItX49Stv3npPcTCBNUkCPrS84Tdk7h2I6ovWp7 9Fc8OgjjXHg4= 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=8M5ID6p81lujtOhVvMpepDaHd2Rb6x3wtFhlk+nEX4A=; b=IG9qbYYj JhI3VSUi8RBxNDzwMgy3wT3HYx+mGotituZARr9npDOV37T+2BddFDuIp3y3LmS1 Nheq+aZc19mp2Eh4SfaV47/6/S6obSKdxv1ylczmUEiEXUSwCCof9fsH7F/lE6CD tKfyaVXJlW0w8z2t87zZg618EMeHkgdByr//HGe3j05kGTjViIZ89Jolze0tVR4L bIgfvQQH64FvnbDUNTz890dkBUJ+oGrrxrgdDbtRA9uLV/z5pBbfPeBGwJ9quh1z y3xCevaGke3u+PkRopnlisJyfZUSh8F7NomRh1Sseby6zW0Q9nYVCxXdD54yOQ4L fkPhLDxHs0TuCQ== X-ME-Sender: X-Sasl-enc: Pvv1xk5sTye3YXicWjDmfC6RJJBaR76K9jD/Oy9plgQl 1499949406 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id F06E02413F; Thu, 13 Jul 2017 08:36:46 -0400 (EDT) From: Thomas Monjalon To: "Wiles, Keith" Cc: Stephen Hemminger , dev@dpdk.org Date: Thu, 13 Jul 2017 14:36:46 +0200 Message-ID: <1928687.rzFJKnVBFz@xps> In-Reply-To: <97A8C4B8-3AC2-47D1-AC31-C75D6E23D7AE@intel.com> References: <20170711185546.26138-1-stephen@networkplumber.org> <7177425.p9cP4Rfg1a@xps> <97A8C4B8-3AC2-47D1-AC31-C75D6E23D7AE@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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: Thu, 13 Jul 2017 12:36:48 -0000 13/07/2017 14:19, Wiles, Keith: >=20 > > On Jul 13, 2017, at 1:56 AM, Thomas Monjalon wrot= e: > >=20 > > 12/07/2017 23:59, Stephen Hemminger: > >> On Tue, 11 Jul 2017 22:33:55 +0200 > >> Thomas Monjalon wrote: > >>=20 > >>> 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 ;) > >>>=20 > >>> I would like to propose this shell script: > >>>=20 > >>> dirs=3D'app buildtools drivers examples lib test' > >>> pattern=3D'^[[:space:]]*#include[[:space:]]*[<"](.*)[>"].*' > >>>=20 > >>> for file in $(git ls $dirs) ; do > >>> dups=3D$(sed -rn "s,$pattern,\1,p" $file | sort | uniq -d) > >>> [ -n "$dups" ] || continue > >>> echo "$file" > >>> echo "$dups" | sed 's,^,\t,' > >>> done > >>=20 > >> There is no "git ls" command in current version,=20 > >>=20 > >> Using find instead works. > >=20 > > Yes, both work if specifying source code directories as above. >=20 > =E2=80=98git ls=E2=80=99 I had to change it to =E2=80=98git ls-files=E2= =80=99 to make it work. I think you have a git alias setup for ls-files. Ah yes, you're right! Thanks, I has not well understood the original comment :) > Can this be added to the patch testing? Yes sure, I will do.