Enforce UpperCamelCase for local variables

This commit is contained in:
ChillerDragon 2024-03-25 10:02:49 +08:00
parent e263ce9bdc
commit 63c8172d11
3 changed files with 18 additions and 1 deletions

View file

@ -77,7 +77,6 @@ Checks: >
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-identifier-naming,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-magic-numbers,
@ -89,3 +88,19 @@ Checks: >
performance-*,
-performance-no-int-to-ptr,
portability-*,
WarningsAsErrors:
readability-identifier-naming,
CheckOptions:
- key: readability-identifier-naming.LocalVariableCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantCase
value: aNy_CasE
- key: readability-identifier-naming.StaticVariableCase
value: aNy_CasE
- key: readability-identifier-naming.LocalConstantCase
value: aNy_CasE
- key: readability-identifier-naming.LocalVariableIgnoredRegexp
value: '^(p|a|s_|FT_|TB_|s_|ul_|v|[xy]i$|[zijklxyhmrgbacwestnduvqf]$|[dmpwsitcf][xy]$|(ch|skel)[0-2]?$|it$|tw$|dt$|th$|ls$|func$|res$|shader$|len$|maxLength$|length$|offset$|offpos$|result$|bg$|sp$|url$|Tickdelta_legacy$|index$|ctxt$|key$|null$|logger$|LAST_MODIFIED$|GfxFsaaSamples_MouseButton$|teleNr$|target$|id$|hit$|hsl[0-2]?$|rgb[0-2]?$|dir$|tmp$|cData$|sub$|ret$|rendered$|(lower|upper)(16|26|24|32)|size$|wSearch$|bAlreadyHit$|isWeaponCollide$|zerochar$|dist$|sound$|match$|best_skin$|best_matches$|m_aClient$|matches$|nohook$|through_cut$|btn$|savedLayers$|l[hw]$|evilz$|sec$|min$|to2$|delay$|m_TileF?Index$|mode$|maxModes$|numModes$|iLogLength$|[xy]Fract$|[xy]Int$|imgg[xy]$|skip$|localPlayer$|fdratio$|[rgbat][0-2]$|[xy][0-3]$|x[rl]$).*'

1
src/base/.clang-tidy Normal file
View file

@ -0,0 +1 @@
Checks: '-readability-identifier-naming'

1
src/tools/.clang-tidy Normal file
View file

@ -0,0 +1 @@
Checks: '-readability-identifier-naming'