Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754182Ab0A0Scw (ORCPT ); Wed, 27 Jan 2010 13:32:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753344Ab0A0Scv (ORCPT ); Wed, 27 Jan 2010 13:32:51 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:36963 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898Ab0A0Scu (ORCPT ); Wed, 27 Jan 2010 13:32:50 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=pfn6cMeJeH9flmnVJamf3nSyM0Oky9O4EzGLR98jIr59W0xsWnGjNkbwpKCpfuEKQ+ uanIDYOHVR135pfTv0XFN6szu+/LVDBto2I0v80heizK+5Pf1dJRKZuAgSJZnAXJuTQj I6hcmGDOQRQnvBHB6n0xtOeUjHba/lNvCsg9Q= Subject: [RFC] checkpatch.pl: warn if an adding line introduce spaces before tabs. From: Alberto Panizzo To: linux-kernel Cc: Andrew Morton , Andy Whitcroft , Daniel Walker Content-Type: text/plain; charset="UTF-8" Date: Wed, 27 Jan 2010 19:32:44 +0100 Message-ID: <1264617164.2463.181.camel@realization> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1052 Lines: 36 This apply to the linux-next tree. It is a useful thing to warn. Signed-off-by: Alberto Panizzo --- scripts/checkpatch.pl | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bc4114f..ab18a11 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1411,6 +1411,12 @@ sub process { ERROR("code indent should use tabs where possible\n" . $herevet); } +# check for space before tabs. + if ($rawline =~ /^\+/ && $rawline =~ / \t/) { + my $herevet = "$here\n" . cat_vet($rawline) . "\n"; + WARN("please, no space before tabs\n" . $herevet); + } + # check we are in a valid C source file if not then ignore this hunk next if ($realfile !~ /\.(h|c)$/); -- 1.6.3.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/