1 // RUN: %check_clang_tidy %s readability-identifier-naming %t -- \ 2 // RUN: -config="{CheckOptions: [ \ 3 // RUN: {key: readability-identifier-naming.ParameterCase, value: CamelCase}, \ 4 // RUN: {key: readability-identifier-naming.ParameterIgnoredRegexp, value: '^[a-z]{1,2}$'}, \ 5 // RUN: {key: readability-identifier-naming.ClassCase, value: CamelCase}, \ 6 // RUN: {key: readability-identifier-naming.ClassIgnoredRegexp, value: '^fo$|^fooo$'}, \ 7 // RUN: {key: readability-identifier-naming.StructCase, value: CamelCase}, \ 8 // RUN: {key: readability-identifier-naming.StructIgnoredRegexp, value: 'sooo|so|soo|$invalidregex['} \ 9 // RUN: ]}" 10 11 int testFunc(int a, char **b); 12 int testFunc(int ab, char **ba); 13 int testFunc(int abc, char **cba); 14 // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for parameter 'abc' 15 // CHECK-MESSAGES: :[[@LINE-2]]:30: warning: invalid case style for parameter 'cba' 16 // CHECK-FIXES: {{^}}int testFunc(int Abc, char **Cba);{{$}} 17 int testFunc(int dE, char **eD); 18 // CHECK-MESSAGES: :[[@LINE-1]]:18: warning: invalid case style for parameter 'dE' 19 // CHECK-MESSAGES: :[[@LINE-2]]:29: warning: invalid case style for parameter 'eD' 20 // CHECK-FIXES: {{^}}int testFunc(int DE, char **ED);{{$}} 21 int testFunc(int Abc, char **Cba); 22 23 class fo { 24 }; 25 26 class fofo { 27 // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'fofo' 28 // CHECK-FIXES: {{^}}class Fofo {{{$}} 29 }; 30 31 class foo { 32 // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'foo' 33 // CHECK-FIXES: {{^}}class Foo {{{$}} 34 }; 35 36 class fooo { 37 }; 38 39 class afooo { 40 // CHECK-MESSAGES: :[[@LINE-1]]:7: warning: invalid case style for class 'afooo' 41 // CHECK-FIXES: {{^}}class Afooo {{{$}} 42 }; 43 44 struct soo { 45 // CHECK-MESSAGES: :[[@LINE-1]]:8: warning: invalid case style for struct 'soo' 46 // CHECK-FIXES: {{^}}struct Soo {{{$}} 47 }; 48