From e8d0163aa4cc0b92a73acd55d9379a6bdf1c547f Mon Sep 17 00:00:00 2001 From: Octol1ttle Date: Wed, 25 Feb 2026 12:21:51 +0500 Subject: [PATCH] Update .clang-tidy configuration file Enables most of checks provided by clang-tidy, with checks that do not fit us excluded. The table containing naming conventions was using wrong values, that was fixed and now tidy correctly warns and fixes naming convention issues Signed-off-by: Octol1ttle --- .clang-tidy | 49 +++++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 6c489fb50..a2fec8dd6 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,23 +1,32 @@ -Checks: - - modernize-use-using - - readability-avoid-const-params-in-decls - - misc-unused-parameters, - - readability-identifier-naming +FormatStyle: file -# ^ Without unused-parameters the readability-identifier-naming check doesn't cause any warnings. +Checks: + 'bugprone-*,clang-analyzer-*,cppcoreguidelines-*,hicpp-*,misc-*,modernize-*,performance-*,portability-*,readability-*, + -*-magic-numbers, + -*-non-private-member-variables-in-classes, + -*-special-member-functions, + -bugprone-easily-swappable-parameters, + -cppcoreguidelines-owning-memory, + -cppcoreguidelines-pro-type-static-cast-downcast, + -modernize-use-nodiscard, + -modernize-use-trailing-return-type, + -portability-avoid-pragma-once, + -readability-avoid-unconditional-preprocessor-if, + -readability-function-cognitive-complexity, + -readability-identifier-length, + -readability-redundant-access-specifiers' CheckOptions: - - { key: readability-identifier-naming.ClassCase, value: PascalCase } - - { key: readability-identifier-naming.EnumCase, value: PascalCase } - - { key: readability-identifier-naming.FunctionCase, value: camelCase } - - { key: readability-identifier-naming.GlobalVariableCase, value: camelCase } - - { key: readability-identifier-naming.GlobalFunctionCase, value: camelCase } - - { key: readability-identifier-naming.GlobalConstantCase, value: SCREAMING_SNAKE_CASE } - - { key: readability-identifier-naming.MacroDefinitionCase, value: SCREAMING_SNAKE_CASE } - - { key: readability-identifier-naming.ClassMemberCase, value: camelCase } - - { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ } - - { key: readability-identifier-naming.ProtectedMemberPrefix, value: m_ } - - { key: readability-identifier-naming.PrivateStaticMemberPrefix, value: s_ } - - { key: readability-identifier-naming.ProtectedStaticMemberPrefix, value: s_ } - - { key: readability-identifier-naming.PublicStaticConstantCase, value: SCREAMING_SNAKE_CASE } - - { key: readability-identifier-naming.EnumConstantCase, value: PascalCase } + - { key: misc-include-cleaner.MissingIncludes, value: false } + - { key: readability-identifier-naming.DefaultCase, value: camelBack } + - { key: readability-identifier-naming.NamespaceCase, value: CamelCase } + - { key: readability-identifier-naming.ClassCase, value: CamelCase } + - { key: readability-identifier-naming.ClassConstantCase, value: CamelCase } + - { key: readability-identifier-naming.EnumCase, value: CamelCase } + - { key: readability-identifier-naming.EnumConstantCase, value: CamelCase } + - { key: readability-identifier-naming.MacroDefinitionCase, value: UPPER_CASE } + - { key: readability-identifier-naming.ClassMemberPrefix, value: m_ } + - { key: readability-identifier-naming.StaticConstantPrefix, value: s_ } + - { key: readability-identifier-naming.StaticVariablePrefix, value: s_ } + - { key: readability-identifier-naming.GlobalConstantPrefix, value: g_ } + - { key: readability-implicit-bool-conversion.AllowPointerConditions, value: true }