From a704e96f00342d3551349c370fe19220cfec9c5a Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 15 Oct 2008 22:02:27 -0700 Subject: [PATCH] --- yaml --- r: 114769 b: refs/heads/master c: 5368df20fb364e394da3ab88d3d60ee3c0a9e5ba h: refs/heads/master i: 114767: a8c81e7bef0638a6251785aadc3b2467176833eb v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index f744b0a7aca9..64d877c13777 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 81bc0e020232a1e1e7010376382bb59ca82927ac +refs/heads/master: 5368df20fb364e394da3ab88d3d60ee3c0a9e5ba diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 18646f076a84..a2e4a3d9c6d7 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1241,9 +1241,6 @@ sub process { #ignore lines being removed if ($line=~/^-/) {next;} -# check we are in a valid source file if not then ignore this hunk - next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); - #trailing whitespace if ($line =~ /^\+.*\015/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; @@ -1253,6 +1250,10 @@ sub process { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; ERROR("trailing whitespace\n" . $herevet); } + +# check we are in a valid source file if not then ignore this hunk + next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); + #80 column limit if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && $rawline !~ /^.\s*\*\s*\@$Ident\s/ &&