Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346425
b: refs/heads/master
c: 323c126
h: refs/heads/master
i:
  346423: aea9747
v: v3
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Dec 18, 2012
1 parent 47fc276 commit 04d021f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74349bccedb3e34b4f1fd9c7efd2dda7905e3335
refs/heads/master: 323c1260ba2c4b5c4b2a1e9ab6657cde54ccf554
19 changes: 13 additions & 6 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1398,6 +1398,8 @@ sub process {
my %suppress_export;
my $suppress_statement = 0;

my %camelcase = ();

# Pre-scan the patch sanitizing the lines.
# Pre-scan the patch looking for any __setup documentation.
#
Expand Down Expand Up @@ -2905,12 +2907,17 @@ sub process {
}
}

#studly caps, commented out until figure out how to distinguish between use of existing and adding new
# if (($line=~/[\w_][a-z\d]+[A-Z]/) and !($line=~/print/)) {
# print "No studly caps, use _\n";
# print "$herecurr";
# $clean = 0;
# }
#CamelCase
while ($line =~ m{($Constant|$Lval)}g) {
my $var = $1;
if ($var !~ /$Constant/ &&
$var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ &&
!defined $camelcase{$var}) {
$camelcase{$var} = 1;
WARN("CAMELCASE",
"Avoid CamelCase: <$var>\n" . $herecurr);
}
}

#no spaces allowed after \ in define
if ($line=~/\#\s*define.*\\\s$/) {
Expand Down

0 comments on commit 04d021f

Please sign in to comment.