[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers
From: |
Radim Krčmář |
Subject: |
Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers |
Date: |
Tue, 9 Aug 2016 18:37:51 +0200 |
>> Make scripts/checkpatch.pl accept tabs in linux-headers/, instead of
>> changing scripts/update-linux-headers.sh to expand tabs when importing.
>>
>> Signed-off-by: Radim Krčmář <address@hidden>
>> ---
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 929708721299..38232d4b25c3 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -1355,7 +1355,7 @@ sub process {
>> next if ($realfile !~ /\.(h|c|cpp|pl)$/);
>>
>> # in QEMU, no tabs are allowed
>> - if ($rawline =~ /^\+.*\t/) {
>> + if ($rawline =~ /^\+.*\t/ && $realfile !~ /^linux-headers\//) {
>> my $herevet = "$here\n" . cat_vet($rawline) . "\n";
>> ERROR("code indent should never use tabs\n" . $herevet);
>> $rpt_cleaners = 1;
>>
>
> Could you do the same for standard-headers/ too?
Sure, and when we are at it ... are *.pl files going to be reindented?
e.g. checkpatch.pl uses tabs consistently, get_maintainer.pl is a
horrible mix of tabs and spaces [1], and clean-header-guards.pl uses 4
spaces for an indent.
---
1: get_maintainer.pl assumes that tab is 8 spaces and uses 1 tab for
every two consecutive indents and 4 spaces for indents that cannot be
tabified, then tops the ugliness by also using 8 and 12 spaces for 2
and 3 indents, respectively.
- [Qemu-devel] [PATCH for-2.7 0/2] intel-iommu: restrict EIM to quirkless KVM, Radim Krčmář, 2016/08/09
- [Qemu-devel] [PATCH 1/2] linux-headers: update to v4.8-rc1, Radim Krčmář, 2016/08/09
- [Qemu-devel] [PATCH 2/2] intel-iommu: restrict EIM to quirkless KVM, Radim Krčmář, 2016/08/09
- Re: [Qemu-devel] [PATCH for-2.7 0/2] intel-iommu: restrict EIM to quirkless KVM, no-reply, 2016/08/09
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, Cornelia Huck, 2016/08/10
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, Radim Krčmář, 2016/08/10
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, Cornelia Huck, 2016/08/10
- Re: [Qemu-devel] [PATCH] checkpatch: allow tabs in linux-headers, no-reply, 2016/08/09