diff options
author | Alberto Panizzo <maramaopercheseimorto@gmail.com> | 2010-03-05 13:43:54 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 11:26:44 -0800 |
commit | 08e4436566250cb98b3f3ac37643b1cf09481256 (patch) | |
tree | c669f150a8db7cacdcb7a720d61937f08d96d8c1 /scripts/checkpatch.pl | |
parent | 79404849e90a41ea2109bd0e2f7c7164b0c4ce73 (diff) |
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>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1a93ac265c3..cf4e44cf3c2 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)$/); |