diff --git a/.clang-tidy b/.clang-tidy index d41c71378..3c7bbbd94 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -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]$).*' + diff --git a/src/base/.clang-tidy b/src/base/.clang-tidy new file mode 100644 index 000000000..6d6f9e5d5 --- /dev/null +++ b/src/base/.clang-tidy @@ -0,0 +1 @@ +Checks: '-readability-identifier-naming' diff --git a/src/tools/.clang-tidy b/src/tools/.clang-tidy new file mode 100644 index 000000000..6d6f9e5d5 --- /dev/null +++ b/src/tools/.clang-tidy @@ -0,0 +1 @@ +Checks: '-readability-identifier-naming'