[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1264617164.2463.181.camel@realization>
Date: Wed, 27 Jan 2010 19:32:44 +0100
From: Alberto Panizzo <maramaopercheseimorto@...il.com>
To: linux-kernel <linux-kernel@...r.kernel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Andy Whitcroft <apw@...onical.com>,
Daniel Walker <dwalker@...o99.com>
Subject: [RFC] checkpatch.pl: warn if an adding line introduce spaces
before tabs.
This apply to the linux-next tree.
It is a useful thing to warn.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@...il.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists