qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Anand J <anand.indukala@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] clean-up: removed duplicate #includes
Date: Mon, 10 Oct 2016 11:25:19 -0500	[thread overview]
Message-ID: <84deb988-1a31-c82f-a4d3-5ef8ebfb8dbb@redhat.com> (raw)
In-Reply-To: <CANDALvmjgU4JERC1e7DaUzzw8C1LonikfpZrwo9DpbiEBdaOxg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-10-10 16:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-07  8:46 [Qemu-devel] [PATCH] clean-up: removed duplicate #includes Anand J
2016-10-07 14:31 ` Eric Blake
2016-10-07 14:49   ` Peter Maydell
2016-10-08 11:32   ` Anand J
2016-10-08 21:34     ` Eric Blake
2016-10-09  9:33       ` Anand J
2016-10-10 16:25         ` Eric Blake [this message]
2016-10-07 14:48 ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=84deb988-1a31-c82f-a4d3-5ef8ebfb8dbb@redhat.com \
    --to=eblake@redhat.com \
    --cc=anand.indukala@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).