From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXU0n-0003Wh-8B for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:57:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXU0j-0008A3-BU for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:57:37 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXU0j-00089r-4L for qemu-devel@nongnu.org; Wed, 10 Aug 2016 09:57:33 -0400 Received: by mail-wm0-x243.google.com with SMTP id i138so9677448wmf.3 for ; Wed, 10 Aug 2016 06:57:32 -0700 (PDT) Received: from 640k.lan (94-39-152-88.adsl-ull.clienti.tiscali.it. [94.39.152.88]) by smtp.gmail.com with ESMTPSA id a9sm43257024wjf.16.2016.08.10.06.57.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Aug 2016 06:57:31 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 10 Aug 2016 15:57:13 +0200 Message-Id: <1470837437-14713-11-git-send-email-pbonzini@redhat.com> In-Reply-To: <1470837437-14713-1-git-send-email-pbonzini@redhat.com> References: <1470837437-14713-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 10/14] checkpatch: tweak the files in which TABs are checked List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Include Python and shell scripts, and make an exception for Perl scripts we imported from Linux or elsewhere. Acked-by: Cornelia Huck Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8d1813e..082c4ce 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1334,7 +1334,7 @@ sub process { } # check we are in a valid source file if not then ignore this hunk - next if ($realfile !~ /\.(h|c|cpp|s|S|pl|sh)$/); + next if ($realfile !~ /\.(h|c|cpp|s|S|pl|py|sh)$/); #80 column limit if ($line =~ /^\+/ && @@ -1354,10 +1354,11 @@ sub process { WARN("adding a line without newline at end of file\n" . $herecurr); } -# check we are in a valid source file C or perl if not then ignore this hunk - next if ($realfile !~ /\.(h|c|cpp|pl)$/); +# tabs are only allowed in assembly source code, and in +# some scripts we imported from other projects. + next if ($realfile =~ /\.(s|S)$/); + next if ($realfile =~ /(checkpatch|get_maintainer|texi2pod)\.pl$/); -# in QEMU, no tabs are allowed if ($rawline =~ /^\+.*\t/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; ERROR("code indent should never use tabs\n" . $herevet); -- 1.8.3.1