[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes |
Date: |
Mon, 10 Oct 2016 11:25:19 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 10/09/2016 04:33 AM, Anand J wrote:
>>> grep -r --exclude-dir=bin/ "#include" | sort | uniq -c | awk '{if ($1 >
>> 1)
>>> print $2}'
>>
>> Seems simple enough that we ought to make it part of the
>> scripts/clean-includes, rather than remembering to manually run it.
>>
>
> scripts/clean-includes does an in place modification of the duplicate
> entries in the files.
> There is no guarantee that my script with return all genuine duplicate
> entries. Some can be false positive as well.
If you don't trust an in-place modification, then maybe it is simple
enough to just make scripts/clean-includes fail with non-zero status and
flag that the files need manual attention, then rerunning the script.
But still, having the script be able to flag the problems, whether or
not it can fix them, is better than making it a comment where no one
remembers to manually run the comment.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes, Peter Maydell, 2016/10/07