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 0E0A22C6A for ; Mon, 17 Jul 2017 15:02:01 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4882F20A94; Mon, 17 Jul 2017 09:02:01 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 17 Jul 2017 09:02:01 -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=hzlLuL3IbHTCs/z wxN67B3MH3ssMpJ8TfBVxLztvCmk=; b=ALzv4kkJRJdDeCCO5ARoXJ9fPVJPxLR D40dEih8sWgKkH3NOnqY9zBrG6fd7nrd+Cx1LXr2LLJxTB4oD3ymDft+gvAQst8t STshDwDdblYhklPBgTN8uGQdhMybchPkeePndm/LZz3Gd7+solBXTDt3AtqwnCPf o+5rcjTQ68TQ= 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=hzlLuL3IbHTCs/zwxN67B3MH3ssMpJ8TfBVxLztvCmk=; b=HijlDj8H E7h7x61e+DN+6jKl8zb8jTKZ6Y6mK4e3i74j1BbMUZ0lNYx6n/Wuuhejz8qmwzH7 bDQr7lFDYwj75Defn6PRWx6iFQ0Y2eEbBboGeJ1a6IGa7LYxTszhYHEb8fwROFiK GkL9Bb4wwCKnFc4Lk9K4RISxWbd/JiGZAY9vT72BoEGZHDKu8V4aF18ots0p1SkP 8JPrlh1hILO1a7G8F3KBB3uWWv8PWlgVa/FgD/oN645DSHrdjFHFIEO8QvY8MUtp ZvplK3pCamxo8jE0/gS+wIy+s0pXTvZV6ihPVgBXydqysaIdo63Wy7KaFmshSxGE hYJYBCgJyecz5g== X-ME-Sender: X-Sasl-enc: JlyaQnr3zRIIpB5LXvNAw3UUKXpsy0VqlWuZMJWyZLzN 1500296519 Received: from xps.localnet (unknown [37.163.5.30]) by mail.messagingengine.com (Postfix) with ESMTPA id D287C24812; Mon, 17 Jul 2017 09:01:59 -0400 (EDT) From: Thomas Monjalon To: Neil Horman Cc: stephen@networkplumber.org, dev@dpdk.org, keith.wiles@intel.com Date: Mon, 17 Jul 2017 16:01:52 +0300 Message-ID: <3770198.21lzg5AVeE@xps> In-Reply-To: <20170717115006.GA20646@hmswarspite.think-freely.org> References: <20170711185546.26138-2-stephen@networkplumber.org> <20170714170707.22464-1-thomas@monjalon.net> <20170717115006.GA20646@hmswarspite.think-freely.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] devtools: add script to find duplicated 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: Mon, 17 Jul 2017 13:02:02 -0000 17/07/2017 14:50, Neil Horman: > On Fri, Jul 14, 2017 at 07:07:07PM +0200, Thomas Monjalon wrote: > > Based on Stephen's idea (originally implemented in a Perl script), > > this is a shell script to find duplicated includes in a file. > > It looks for all the .c and .h files of the git repository. > > > > It is fast enough because automatically well parallelized. > > > > Suggested-by: Stephen Hemminger > > Signed-off-by: Thomas Monjalon > > --- > > devtools/check-dup-includes.sh | 35 +++++++++++++++++++++++++++++++++++ > > 1 file changed, 35 insertions(+) > > create mode 100755 devtools/check-dup-includes.sh > > > How many times has this been a problem? It is not a problem, just a trivial clean-up. > Find the same file included twice in > any single file seems like a pretty rudimentary thing to catch by visual > inspection during development. At the very least I recall coverity having a > header file analyer which would indicate that a header file was unused, and I > think that offered detection of duplicate includes. Good for Coverity. This simple script is Open Source ;)