From b975afe1080ed577a53db012699ffdbc6910bf12 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 15 Oct 2008 22:02:17 -0700 Subject: [PATCH] --- yaml --- r: 114753 b: refs/heads/master c: a1ef277e2c88c80cfa00580469133e2215442c8d h: refs/heads/master i: 114751: 02a2391690670d09d4a156ed908fd246f1fce6e2 v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index dab9f84755a3..9bda49d7f2fc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1bdab9e5881fde3bf66528db5b91477ce4b35b3b +refs/heads/master: a1ef277e2c88c80cfa00580469133e2215442c8d diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index c6782ac6f130..1c032b1fa9eb 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -66,6 +66,7 @@ my $dbg_values = 0; my $dbg_possible = 0; my $dbg_type = 0; +my $dbg_attr = 0; for my $key (keys %debug) { eval "\${dbg_$key} = '$debug{$key}';" } @@ -1367,6 +1368,15 @@ sub process { } next; } +# TEST: allow direct testing of the attribute matcher. + if ($dbg_attr) { + if ($line =~ /^.\s*$Attribute\s*$/) { + ERROR("TEST: is attr\n" . $herecurr); + } elsif ($dbg_attr > 1 && $line =~ /^.+($Attribute)/) { + ERROR("TEST: is not attr ($1 is)\n". $herecurr); + } + next; + } # check for initialisation to aggregates open brace on the next line if ($prevline =~ /$Declare\s*$Ident\s*=\s*$/ &&