From 141e68f075de5bdb89448b8e71d48c0cacabe9a0 Mon Sep 17 00:00:00 2001 From: dcdemen Date: Tue, 24 Sep 2024 14:35:14 -0600 Subject: [PATCH] The clang-tidy congnitive complexity check no longer expands macros. This change should get rid of warnings about the complexity of code in our unit tests when working with the GTest macros. --- .clang-tidy | 2 ++ tests/unit_tests/system/test_calculate.hpp | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index d9b6f276..4804eab0 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -21,6 +21,8 @@ Checks: "bugprone*, -bugprone-easily-swappable-parameters, -readability-named-parameter, " +CheckOptions: + readability-function-cognitive-complexity.IgnoreMacros: 'true' WarningsAsErrors: '' HeaderFilterRegex: '.*' FormatStyle: none diff --git a/tests/unit_tests/system/test_calculate.hpp b/tests/unit_tests/system/test_calculate.hpp index f3282d80..26545f81 100644 --- a/tests/unit_tests/system/test_calculate.hpp +++ b/tests/unit_tests/system/test_calculate.hpp @@ -44,7 +44,6 @@ inline void CompareWithExpected( } } -// NOLINTBEGIN(readability-function-cognitive-complexity) inline void CompareWithExpected( const Kokkos::View::host_mirror_type& result, const Kokkos::View& expected @@ -61,5 +60,4 @@ inline void CompareWithExpected( } } } -// NOLINTEND(readability-function-cognitive-complexity) } // namespace openturbine::tests