From e6762e8d4d717433452cb1e6901058a8cb18800f Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Mon, 5 Feb 2024 04:24:03 -0700 Subject: [PATCH] Meta: Disable readability-function-cognitive-complexity in clang-tidy Feedback from contributors suggests that this warning doesn't help code quality, and is seen as noisy. --- .clang-tidy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index e2d022cb828..6bba73d87c5 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -13,6 +13,7 @@ # performance-noexcept-move-constructor: The project does not use exceptions, so there are no such optimizations available # performance-no-int-to-ptr: This rule flags every pointer to integer cast, which gets quite noisy. Should only be enabled on a case-by-case basis # readability-braces-around-statements: Redundant braces around single-line conditions is against project style +# readability-function-cognitive-complexity: Most regular contributors seem to turn this one off anyway. Violations are hard to fix as well # readability-magic-numbers: This check is very noisy in the codebase, especially in AK. # readability-named-parameter: We frequently omit parameter names to work around -Wunused-parameter # FIXME: readability-uppercase-literal-suffix: Enable this check, the rationale is solid but the findings are numerous @@ -38,6 +39,7 @@ Checks: > -performance-noexcept-move-constructor, -performance-no-int-to-ptr, -readability-braces-around-statements, + -readability-function-cognitive-complexity, -readability-identifier-length, -readability-magic-numbers, -readability-named-parameter, @@ -53,5 +55,3 @@ CheckOptions: value: true - key: readability-implicit-bool-conversion.AllowPointerConditions value: true - - key: readability-function-cognitive-complexity.Threshold - value: 100 # FIXME: Lower this (30? 50?), and refactor complex functions