Checkpatch doesn't currently find CamelCase definitions of structs, unions or enums. Add that ability.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -443,8 +443,9 @@ sub seed_camelcase_file { · 442 unmodified lines | ||
| 443 | 443 | next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/); |
| 444 | 444 | if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) { |
| 445 | 445 | $camelcase{$1} = 1; |
| 446 | − } | |
| 447 | − elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) { | |
| 446 | + } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) { | |
| 447 | + $camelcase{$1} = 1; | |
| 448 | + } elsif ($line =~ /^\s*(?:union|struct|enum)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[;\{]/) { | |
| 448 | 449 | $camelcase{$1} = 1; |
| 449 | 450 | } |
| 450 | 451 | } |