brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 794f6d3 Raw
18 lines · cpp
1// RUN: clang-tidy %s -checks=readability-identifier-naming \2// RUN:   -config="{CheckOptions: {\3// RUN:   readability-identifier-naming.FunctionCase: camelback, \4// RUN:   readability-identifier-naming.VariableCase: camelBack, \5// RUN:   readability-identifier-naming.ClassCase: UUPER_CASE, \6// RUN:   readability-identifier-naming.StructCase: CAMEL, \7// RUN:   readability-identifier-naming.EnumCase: AnY_cASe, \8// RUN:   readability-identifier-naming.VirtualMethodCase: lEaDiNg_upper_SNAKE_CaSe, \9// RUN:   }}" -- 2>&1 | FileCheck %s --implicit-check-not="{{warning|error}}:"10 11// CHECK-DAG: warning: invalid configuration value 'camelback' for option 'readability-identifier-naming.FunctionCase'; did you mean 'camelBack'? [clang-tidy-config]12// CHECK-DAG: warning: invalid configuration value 'UUPER_CASE' for option 'readability-identifier-naming.ClassCase'; did you mean 'UPPER_CASE'? [clang-tidy-config]13// Don't try to suggest an alternative for 'CAMEL'14// CHECK-DAG: warning: invalid configuration value 'CAMEL' for option 'readability-identifier-naming.StructCase' [clang-tidy-config]15// This fails on the EditDistance, but as it matches ignoring case suggest the correct value16// CHECK-DAG: warning: invalid configuration value 'AnY_cASe' for option 'readability-identifier-naming.EnumCase'; did you mean 'aNy_CasE'? [clang-tidy-config]17// CHECK-DAG: warning: invalid configuration value 'lEaDiNg_upper_SNAKE_CaSe' for option 'readability-identifier-naming.VirtualMethodCase'; did you mean 'Leading_upper_snake_case'? [clang-tidy-config]18