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 <step...@networkplumber.org>
> Signed-off-by: Thomas Monjalon <tho...@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?  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

Reply via email to