Received: from eggs.gnu.org ([2001:4830:134:3::10]:44098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9Fv-00058Q-2j for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:47:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bX9Fu-0001By-8M for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:47:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bX9Fu-0001Bo-2H for qemu-devel@nongnu.org; Tue, 09 Aug 2016 11:47:50 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F0C17AE94 for ; Tue, 9 Aug 2016 15:47:49 +0000 (UTC) From: Paolo Bonzini Date: Tue, 9 Aug 2016 17:47:42 +0200 Message-Id: <1470757664-25161-2-git-send-email-pbonzini@redhat.com> In-Reply-To: <1470757664-25161-1-git-send-email-pbonzini@redhat.com> References: <1470757664-25161-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 1/3] 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 Cc: thuth@redhat.com, armbru@redhat.com, famz@redhat.com, berrange@redhat.com Include Python and shell scripts, and make an exception for Perl scripts we imported from Linux or elsewhere. Signed-off-by: Paolo Bonzini --- scripts/checkpatch.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b7cb4ab..7ccf6a8 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1351,8 +1351,10 @@ 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)$/); +# check we are in a valid source file; if not then tabs are allowed. +# make an exception from some scripts imported from other projects. + next if ($realfile !~ /\.(h|c|cpp|pl|py|sh)$/); + next if ($realfile =~ /(checkpatch|get_maintainer|texi2pod)\.pl$/); # in QEMU, no tabs are allowed if ($rawline =~ /^\+.*\t/) { -- 2.7.4