Checkpatch doesn't currently find CamelCase definitions of structs, unions or enums. Add that ability.
Unified · Split
| @@ -443,8 +443,9 @@ sub seed_camelcase_file { · 442 unmodified lines | |||
| 443 | next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/); | 443 | next if ($line !~ /(?:[A-Z][a-z]|[a-z][A-Z])/); |
| 444 | if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) { | 444 | if ($line =~ /^[ \t]*(?:#[ \t]*define|typedef\s+$Type)\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)/) { |
| 445 | $camelcase{$1} = 1; | 445 | $camelcase{$1} = 1; |
| 446 | } | 446 | } elsif ($line =~ /^\s*$Declare\s+(\w*(?:[A-Z][a-z]|[a-z][A-Z])\w*)\s*[\(\[,;]/) { |
| 447 | 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 | $camelcase{$1} = 1; | 449 | $camelcase{$1} = 1; |
| 449 | } | 450 | } |
| 450 | } | 451 | } |