From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 8F2DE2C6A for ; Mon, 17 Jul 2017 13:50:23 +0200 (CEST) Received: from [2606:a000:111b:4246:8ab7:c152:38fa:c6bd] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1dX4XV-0007PE-MH; Mon, 17 Jul 2017 07:50:18 -0400 Date: Mon, 17 Jul 2017 07:50:06 -0400 From: Neil Horman To: Thomas Monjalon Cc: stephen@networkplumber.org, dev@dpdk.org, keith.wiles@intel.com Message-ID: <20170717115006.GA20646@hmswarspite.think-freely.org> References: <20170711185546.26138-2-stephen@networkplumber.org> <20170714170707.22464-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170714170707.22464-1-thomas@monjalon.net> User-Agent: Mutt/1.8.3 (2017-05-23) X-Spam-Score: -2.9 (--) X-Spam-Status: No 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 11:50:23 -0000 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? 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. Neil