All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] checkpatch.pl: warn if an adding line introduce spaces before tabs.
@ 2010-01-27 18:32 Alberto Panizzo
  0 siblings, 0 replies; only message in thread
From: Alberto Panizzo @ 2010-01-27 18:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Andy Whitcroft, Daniel Walker

This apply to the linux-next tree.

It is a useful thing to warn.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-27 18:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-27 18:32 [RFC] checkpatch.pl: warn if an adding line introduce spaces before tabs Alberto Panizzo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.