From cdf8cc0a8b7f3d1aac049dfd3c1ef7bc6f0358ca Mon Sep 17 00:00:00 2001 From: Brett Buddin Date: Fri, 3 Jan 2025 09:12:33 -0500 Subject: [PATCH] clang-tidy: Ignore do-while in macros. --- .clang-tidy | 1 + test/test.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 47b1c02..66df7f4 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -7,6 +7,7 @@ FormatStyle: llvm CheckOptions: cppcoreguidelines-avoid-magic-numbers.IgnorePowersOf2IntegerValues: 'true' cppcoreguidelines-avoid-magic-numbers.IgnoreAllFloatingPointValues: 'true' + cppcoreguidelines-avoid-do-while.IgnoreMacros: 'true' llvm-else-after-return.WarnOnConditionVariables: 'false' modernize-loop-convert.MinConfidence: reasonable modernize-replace-auto-ptr.IncludeStyle: llvm diff --git a/test/test.cpp b/test/test.cpp index b794ff5..610115c 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -1,5 +1,4 @@ // NOLINTBEGIN(cppcoreguidelines-avoid-non-const-global-variables) -// NOLINTBEGIN(cppcoreguidelines-avoid-do-while) #include #include @@ -397,5 +396,4 @@ TEST_CASE("hilbert transform: phase coherence") { CHECK(hilbertTransform(15000.0f) < 2.0f); } -// NOLINTEND(cppcoreguidelines-avoid-do-while) // NOLINTEND(cppcoreguidelines-avoid-non-const-global-variables)