All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 5/8] scripts/clean-includes: Add --all option
Date: Thu, 18 Feb 2016 12:09:00 -0700	[thread overview]
Message-ID: <56C616CC.3030805@redhat.com> (raw)
In-Reply-To: <1455818725-7647-6-git-send-email-peter.maydell@linaro.org>

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

On 02/18/2016 11:05 AM, Peter Maydell wrote:
> Add a --all option which will run the script on every C
> source and header file in the repository (except for those
> in a few directories which contain standalone guest code).
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  scripts/clean-includes | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 

> +# Regular expression defining files to ignore when using --all

s/Regular/Extended regular/, to make it obvious which flavor we are
using? (But yes to ERE; it's a pain to write \(..\|..\) in BRE).

> +XDIRREGEX='^(tests/tcg|tests/multiboot|pc-bios|disas/libvixl)'
> +
>  if [ $# -ne 0 ] && [ "$1" = "--git" ]; then

>  
> +if [ "$1" = "--all" ]; then
> +    # We assume there are no files in the tree with spaces in their name
> +    set -- $(git ls-files '*.[ch]' | egrep -v "$XDIRREGEX")

'grep -E' is slightly more portable than 'egrep'.

We could perhaps patch checkpatch.pl to enforce that no new files with
stupid names are checked in...

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
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-02-18 19:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-18 18:05 [Qemu-devel] [PATCH 0/8] more include cleaning Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 1/8] cpu: Clean up includes Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 2/8] osdep.h: Define macros for the benefit of C++ before C++11 Peter Maydell
2016-02-18 18:51   ` Eric Blake
2016-02-18 18:05 ` [Qemu-devel] [PATCH 3/8] disas/arm-a64.cc: Include osdep.h first Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 4/8] scripts/clean-includes: Enhance to handle header files Peter Maydell
2016-02-18 18:36   ` Peter Maydell
2016-02-18 19:04   ` Eric Blake
2016-02-18 20:07     ` Peter Maydell
2016-02-19 18:03     ` Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 5/8] scripts/clean-includes: Add --all option Peter Maydell
2016-02-18 19:09   ` Eric Blake [this message]
2016-02-18 18:05 ` [Qemu-devel] [PATCH 6/8] osdep.h: Include config-target.h if NEED_CPU_H is defined Peter Maydell
2016-02-18 19:09   ` Eric Blake
2016-02-18 18:05 ` [Qemu-devel] [PATCH 7/8] all: Clean up includes Peter Maydell
2016-02-18 19:16   ` Eric Blake
2016-02-18 20:10     ` Peter Maydell
2016-02-18 18:05 ` [Qemu-devel] [PATCH 8/8] include: " Peter Maydell
2016-02-18 19:54   ` Eric Blake
2016-02-18 20:12     ` Peter Maydell
2016-02-18 20:04 ` [Qemu-devel] [PATCH 0/8] more include cleaning Eric Blake

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=56C616CC.3030805@redhat.com \
    --to=eblake@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.