checkpatch.pl: warn if an adding line introduce spaces before tabs.

Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alberto Panizzo 2010-03-05 13:43:54 -08:00 committed by Linus Torvalds
parent 79404849e9
commit 08e4436566

View file

@ -1422,6 +1422,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)$/);