aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 01:02:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:35 -0400
commitb9ea10d691ecb616ce9e4d7a51400dfd93f52b2d (patch)
tree777d09db4fb4f27a44b3bd524bc4c4d3679d7670 /scripts
parentf055663c5853aa1d9f4c86351a4637462a0b9041 (diff)
checkpatch: perform indent checks on perl
So that we eat our own dog food ensure the indent checks apply to perl too. Signed-off-by: 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')
-rwxr-xr-xscripts/checkpatch.pl7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 36825c3d7d79..ba677c17c334 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1266,8 +1266,8 @@ sub process {
1266 WARN("adding a line without newline at end of file\n" . $herecurr); 1266 WARN("adding a line without newline at end of file\n" . $herecurr);
1267 } 1267 }
1268 1268
1269# check we are in a valid source file *.[hc] if not then ignore this hunk 1269# check we are in a valid source file C or perl if not then ignore this hunk
1270 next if ($realfile !~ /\.[hc]$/); 1270 next if ($realfile !~ /\.(h|c|pl)$/);
1271 1271
1272# at the beginning of a line any tabs must come first and anything 1272# at the beginning of a line any tabs must come first and anything
1273# more than 8 must use tabs. 1273# more than 8 must use tabs.
@@ -1277,6 +1277,9 @@ sub process {
1277 ERROR("code indent should use tabs where possible\n" . $herevet); 1277 ERROR("code indent should use tabs where possible\n" . $herevet);
1278 } 1278 }
1279 1279
1280# check we are in a valid C source file if not then ignore this hunk
1281 next if ($realfile !~ /\.(h|c)$/);
1282
1280# check for RCS/CVS revision markers 1283# check for RCS/CVS revision markers
1281 if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) { 1284 if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) {
1282 WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr); 1285 WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr);