[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 2/8] osdep.h: Define macros for the benefit of C++ before C++11, (continued)
- [Qemu-devel] [PATCH 2/8] osdep.h: Define macros for the benefit of C++ before C++11, Peter Maydell, 2016/02/18
- [Qemu-devel] [PATCH 6/8] osdep.h: Include config-target.h if NEED_CPU_H is defined, Peter Maydell, 2016/02/18
- [Qemu-devel] [PATCH 3/8] disas/arm-a64.cc: Include osdep.h first, Peter Maydell, 2016/02/18
- [Qemu-devel] [PATCH 4/8] scripts/clean-includes: Enhance to handle header files, Peter Maydell, 2016/02/18
- [Qemu-devel] [PATCH 5/8] scripts/clean-includes: Add --all option, Peter Maydell, 2016/02/18
- Re: [Qemu-devel] [PATCH 5/8] scripts/clean-includes: Add --all option,
Eric Blake <=
- [Qemu-devel] [PATCH 1/8] cpu: Clean up includes, Peter Maydell, 2016/02/18
- Re: [Qemu-devel] [PATCH 0/8] more include cleaning, Eric Blake, 2016/02/18