[dpdk-dev] [PATCH] devtools: add script to find duplicated includes
Thomas Monjalon
thomas at monjalon.net
Mon Jul 17 15:01:52 CEST 2017
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 <stephen at networkplumber.org>
> > Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> > ---
> > 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 ;)
More information about the dev
mailing list