qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 5/8] scripts/clean-includes: Add --all option


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 5/8] scripts/clean-includes: Add --all option
Date: Thu, 18 Feb 2016 12:09:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

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 <address@hidden>
> ---
>  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 <address@hidden>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]