From 63f143971bc87c8806e49c02ac99cef2947b6721 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 15 Oct 2008 22:02:24 -0700 Subject: [PATCH] --- yaml --- r: 114764 b: refs/heads/master c: b9ea10d691ecb616ce9e4d7a51400dfd93f52b2d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 4506171ff96f..70b0d4cac8e7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f055663c5853aa1d9f4c86351a4637462a0b9041 +refs/heads/master: b9ea10d691ecb616ce9e4d7a51400dfd93f52b2d diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 36825c3d7d79..ba677c17c334 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1266,8 +1266,8 @@ sub process { WARN("adding a line without newline at end of file\n" . $herecurr); } -# check we are in a valid source file *.[hc] if not then ignore this hunk - next if ($realfile !~ /\.[hc]$/); +# check we are in a valid source file C or perl if not then ignore this hunk + next if ($realfile !~ /\.(h|c|pl)$/); # at the beginning of a line any tabs must come first and anything # more than 8 must use tabs. @@ -1277,6 +1277,9 @@ sub process { ERROR("code indent should use tabs where possible\n" . $herevet); } +# check we are in a valid C source file if not then ignore this hunk + next if ($realfile !~ /\.(h|c)$/); + # check for RCS/CVS revision markers if ($rawline =~ /^\+.*\$(Revision|Log|Id)(?:\$|)/) { WARN("CVS style keyword markers, these will _not_ be updated\n". $herecurr);