From aafa942579883b7cce89ed9685eb0a23f3afcd9d Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Mon, 15 Jun 2026 05:09:17 +0200 Subject: [PATCH] Update list of clang-tidy checks --- .clang-tidy | 139 ++++++++++++++++++++++++++++------------------------ 1 file changed, 74 insertions(+), 65 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 3c5cc4c..acd8cd9 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,104 +1,113 @@ Checks: > - -*, bugprone-*, + cert-*, + clang-*, + concurrency-*, cppcoreguidelines-*, - performance-*, google-*, llvm-include-order, llvm-namespace-comment, - modernize-*, misc-*, + modernize-*, + mpi-*, + openmp-*, + performance-*, + portability-*, readability-*, + -bugprone-casting-through-void, -bugprone-easily-swappable-parameters, - -bugprone-exception-escape, - -bugprone-implicit-widening-of-multiplication-result, - -bugprone-incorrect-roundings, - -bugprone-narrowing-conversions, - -bugprone-signed-char-misuse, - -cppcoreguidelines-avoid-c-arrays, - -cppcoreguidelines-avoid-const-or-ref-data-members, - -cppcoreguidelines-avoid-do-while, + -bugprone-throwing-static-initialization, + -cert-err58-cpp, -cppcoreguidelines-avoid-magic-numbers, - -cppcoreguidelines-explicit-virtual-functions, - -cppcoreguidelines-macro-usage, - -cppcoreguidelines-misleading-capture-default-by-value, - -cppcoreguidelines-narrowing-conversions, -cppcoreguidelines-non-private-member-variables-in-classes, -cppcoreguidelines-owning-memory, - -cppcoreguidelines-pro-bounds-array-to-pointer-decay, - -cppcoreguidelines-pro-bounds-constant-array-index, -cppcoreguidelines-pro-bounds-pointer-arithmetic, - -cppcoreguidelines-pro-type-const-cast, -cppcoreguidelines-pro-type-reinterpret-cast, - -cppcoreguidelines-pro-type-static-cast-downcast, - -cppcoreguidelines-pro-type-union-access, -cppcoreguidelines-pro-type-vararg, - -cppcoreguidelines-rvalue-reference-param-not-moved, - -cppcoreguidelines-special-member-functions, - -modernize-avoid-c-arrays, - -modernize-concat-nested-namespaces, - -modernize-pass-by-value, - -modernize-return-braced-init-list, - -modernize-use-nodiscard, - -modernize-use-trailing-return-type, - -misc-header-include-cycle, -misc-const-correctness, - -misc-no-recursion, - -misc-non-private-member-variables-in-classes, - -misc-use-anonymous-namespace, - -readability-identifier-length, - -readability-magic-numbers, - -readability-named-parameter, - -readability-redundant-declaration + -misc-use-internal-linkage, + -portability-avoid-pragma-once, + -portability-template-virtual-member-function, + -readability-inconsistent-ifelse-braces, + -readability-magic-numbers -WarningsAsErrors: "*" +HeaderFilterRegex: '.*' +ExcludeHeaderFilterRegex: '.*/3rdparty/.*' CheckOptions: - - key: readability-identifier-naming.NamespaceCase - value: lower_case - key: readability-identifier-naming.ClassCase value: CamelCase - - key: readability-identifier-naming.StructCase - value: CamelCase - - key: readability-identifier-naming.TemplateParameterCase - value: CamelCase - - key: readability-identifier-naming.FunctionCase - value: lower_case - - key: readability-identifier-naming.VariableCase - value: lower_case - key: readability-identifier-naming.ClassMemberCase value: lower_case - - key: readability-identifier-naming.ClassMemberSuffix - value: _ - - key: readability-identifier-naming.PrivateMemberSuffix - value: _ - - key: readability-identifier-naming.ProtectedMemberSuffix - value: _ + - key: readability-identifier-naming.ConstexprVariableCase + value: CamelCase + - key: readability-identifier-naming.ConstexprVariablePrefix + value: k + - key: readability-identifier-naming.EnumCase + value: CamelCase - key: readability-identifier-naming.EnumConstantCase value: CamelCase - key: readability-identifier-naming.EnumConstantPrefix value: k - - key: readability-identifier-naming.ConstexprVariableCase + - key: readability-identifier-naming.FunctionCase value: CamelCase - - key: readability-identifier-naming.ConstexprVariablePrefix - value: k - key: readability-identifier-naming.GlobalConstantCase value: CamelCase - key: readability-identifier-naming.GlobalConstantPrefix value: k - - key: readability-identifier-naming.MemberConstantCase - value: CamelCase - - key: readability-identifier-naming.MemberConstantPrefix - value: k - key: readability-identifier-naming.StaticConstantCase value: CamelCase - key: readability-identifier-naming.StaticConstantPrefix value: k - - key: readability-implicit-bool-conversion.AllowIntegerConditions - value: 1 - - key: readability-implicit-bool-conversion.AllowPointerConditions + - key: readability-identifier-naming.StaticVariableCase + value: lower_case + - key: readability-identifier-naming.MacroDefinitionCase + value: UPPER_CASE + - key: readability-identifier-naming.MacroDefinitionIgnoredRegexp + value: '^[A-Z]+(_[A-Z]+)*_$' + - key: readability-identifier-naming.MemberCase + value: lower_case + - key: readability-identifier-naming.PrivateMemberSuffix + value: _ + - key: readability-identifier-naming.PublicMemberSuffix + value: '' + - key: readability-identifier-naming.NamespaceCase + value: lower_case + - key: readability-identifier-naming.ParameterCase + value: lower_case + - key: readability-identifier-naming.TypeAliasCase + value: CamelCase + - key: readability-identifier-naming.TypedefCase + value: CamelCase + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.IgnoreMainLikeFunctions value: 1 + - key: readability-function-cognitive-complexity.Threshold + value: 25 - key: readability-function-cognitive-complexity.IgnoreMacros value: 1 - - key: readability-identifier-naming.MacroDefinitionCase - value: UPPER_CASE + - key: readability-identifier-length.MinimumVariableNameLength + value: 1 + - key: readability-identifier-length.MinimumParameterNameLength + value: 1 + - key: misc-include-cleaner.IgnoreHeaders + value: '(__chrono/.*|stdlib\.h|3rdparty/.*)' + - key: cppcoreguidelines-avoid-non-const-global-variables.AllowInternalLinkage + value: 1 + - key: modernize-type-traits.IgnoreMacros + value: 1 + - key: modernize-use-trailing-return-type.TransformFunctions + value: false + - key: modernize-use-trailing-return-type.TransformLambdas + value: all_except_auto + - key: cppcoreguidelines-avoid-goto.IgnoreMacros + value: 1 + - key: readability-simplify-boolean-expr.ChainedConditionalReturn + value: true + - key: readability-simplify-boolean-expr.ChainedConditionalAssignment + value: true + - key: readability-simplify-boolean-expr.SimplifyDeMorgan + value: true + - key: readability-simplify-boolean-expr.SimplifyDeMorganRelaxed + value: true