From: Alberto Panizzo Date: Fri, 5 Mar 2010 21:43:54 +0000 (-0800) Subject: checkpatch.pl: warn if an adding line introduce spaces before tabs. X-Git-Tag: v2.6.34-rc1~66 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=08e4436566250cb98b3f3ac37643b1cf09481256;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git checkpatch.pl: warn if an adding line introduce spaces before tabs. Signed-off-by: Alberto Panizzo Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1a93ac2..cf4e44c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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)$/);