From 0b20dc728ab488454b6bd7c51ab49565db82c0eb Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Thu, 25 Jun 2026 16:06:13 +0100 Subject: [PATCH] chore: Don't include fwd headers (#3117) --- .clang-tidy | 2 +- .clangd | 1 + src/rpc/RPCHelpers.cpp | 1 - src/rpc/RPCHelpers.hpp | 1 - src/util/requests/RequestBuilder.cpp | 1 - src/web/ng/Request.cpp | 2 -- src/web/ng/Response.cpp | 1 - tests/common/util/TestHttpClient.cpp | 1 - tests/common/util/TestHttpServer.cpp | 1 - tests/common/util/TestWsServer.cpp | 2 -- tests/unit/app/WebHandlersTests.cpp | 1 - tests/unit/util/requests/RequestBuilderTests.cpp | 2 -- tests/unit/web/AdminVerificationTests.cpp | 2 -- tests/unit/web/ng/RPCServerHandlerTests.cpp | 1 - tests/unit/web/ng/RequestTests.cpp | 1 - tests/unit/web/ng/ResponseTests.cpp | 1 - tests/unit/web/ng/ServerTests.cpp | 1 - tests/unit/web/ng/impl/ConnectionHandlerTests.cpp | 1 - tests/unit/web/ng/impl/ErrorHandlingTests.cpp | 1 - tests/unit/web/ng/impl/HttpConnectionTests.cpp | 1 - 20 files changed, 2 insertions(+), 23 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 44042fee5..1b751a9b5 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -159,7 +159,7 @@ CheckOptions: bugprone-unsafe-functions.ReportMoreUnsafeFunctions: true bugprone-unused-return-value.CheckedReturnTypes: ::std::error_code;::std::error_condition;::std::errc - misc-include-cleaner.IgnoreHeaders: '.*/(detail|impl)/.*;.*(expected|unexpected).*;.*ranges_lower_bound\.h;time.h;stdlib.h;__chrono/.*;fmt/chrono.h;boost/uuid/uuid_hash.hpp' + misc-include-cleaner.IgnoreHeaders: '.*/(detail|impl)/.*;.*(expected|unexpected).*;.*ranges_lower_bound\.h;time.h;stdlib.h;__chrono/.*;fmt/chrono.h;boost/uuid/uuid_hash.hpp;.*boost/.*fwd\.hpp' readability-braces-around-statements.ShortStatementLines: 2 readability-identifier-naming.MacroDefinitionCase: UPPER_CASE diff --git a/.clangd b/.clangd index 87a9e010c..31f0bec5d 100644 --- a/.clangd +++ b/.clangd @@ -11,3 +11,4 @@ Diagnostics: - ".*ranges_lower_bound.h" - "time.h" - "stdlib.h" + - ".*boost/.*fwd.hpp" diff --git a/src/rpc/RPCHelpers.cpp b/src/rpc/RPCHelpers.cpp index 22e411a25..e5f6016b3 100644 --- a/src/rpc/RPCHelpers.cpp +++ b/src/rpc/RPCHelpers.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include #include diff --git a/src/rpc/RPCHelpers.hpp b/src/rpc/RPCHelpers.hpp index 25cd7af74..db7183fb4 100644 --- a/src/rpc/RPCHelpers.hpp +++ b/src/rpc/RPCHelpers.hpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/src/util/requests/RequestBuilder.cpp b/src/util/requests/RequestBuilder.cpp index dafdbf14a..4b902e98a 100644 --- a/src/util/requests/RequestBuilder.cpp +++ b/src/util/requests/RequestBuilder.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/src/web/ng/Request.cpp b/src/web/ng/Request.cpp index e3cbf1810..2214ad9f8 100644 --- a/src/web/ng/Request.cpp +++ b/src/web/ng/Request.cpp @@ -3,8 +3,6 @@ #include "util/OverloadSet.hpp" #include -#include -#include #include #include diff --git a/src/web/ng/Response.cpp b/src/web/ng/Response.cpp index c91455837..bd206334b 100644 --- a/src/web/ng/Response.cpp +++ b/src/web/ng/Response.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/common/util/TestHttpClient.cpp b/tests/common/util/TestHttpClient.cpp index 3b83a03ea..3c0880b17 100644 --- a/tests/common/util/TestHttpClient.cpp +++ b/tests/common/util/TestHttpClient.cpp @@ -17,7 +17,6 @@ #include #include // IWYU pragma: keep #include -#include #include #include #include diff --git a/tests/common/util/TestHttpServer.cpp b/tests/common/util/TestHttpServer.cpp index 04e36a178..8aadd1f11 100644 --- a/tests/common/util/TestHttpServer.cpp +++ b/tests/common/util/TestHttpServer.cpp @@ -14,7 +14,6 @@ #include #include #include // IWYU pragma: keep -#include #include #include diff --git a/tests/common/util/TestWsServer.cpp b/tests/common/util/TestWsServer.cpp index 1992cde48..8c26f6537 100644 --- a/tests/common/util/TestWsServer.cpp +++ b/tests/common/util/TestWsServer.cpp @@ -14,8 +14,6 @@ #include #include #include -#include -#include #include #include #include diff --git a/tests/unit/app/WebHandlersTests.cpp b/tests/unit/app/WebHandlersTests.cpp index 6cfc87c1b..cf86f38f4 100644 --- a/tests/unit/app/WebHandlersTests.cpp +++ b/tests/unit/app/WebHandlersTests.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/util/requests/RequestBuilderTests.cpp b/tests/unit/util/requests/RequestBuilderTests.cpp index 1e47f91f4..785856e1c 100644 --- a/tests/unit/util/requests/RequestBuilderTests.cpp +++ b/tests/unit/util/requests/RequestBuilderTests.cpp @@ -6,9 +6,7 @@ #include #include -#include #include -#include #include #include diff --git a/tests/unit/web/AdminVerificationTests.cpp b/tests/unit/web/AdminVerificationTests.cpp index ea3d740b6..7c66ef024 100644 --- a/tests/unit/web/AdminVerificationTests.cpp +++ b/tests/unit/web/AdminVerificationTests.cpp @@ -6,8 +6,6 @@ #include "web/AdminVerificationStrategy.hpp" #include -#include -#include #include #include #include diff --git a/tests/unit/web/ng/RPCServerHandlerTests.cpp b/tests/unit/web/ng/RPCServerHandlerTests.cpp index f0312395e..3a0f9c79a 100644 --- a/tests/unit/web/ng/RPCServerHandlerTests.cpp +++ b/tests/unit/web/ng/RPCServerHandlerTests.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/web/ng/RequestTests.cpp b/tests/unit/web/ng/RequestTests.cpp index 7cbe808c5..a19c88578 100644 --- a/tests/unit/web/ng/RequestTests.cpp +++ b/tests/unit/web/ng/RequestTests.cpp @@ -3,7 +3,6 @@ #include #include -#include #include #include diff --git a/tests/unit/web/ng/ResponseTests.cpp b/tests/unit/web/ng/ResponseTests.cpp index 368a19720..038ccaf27 100644 --- a/tests/unit/web/ng/ResponseTests.cpp +++ b/tests/unit/web/ng/ResponseTests.cpp @@ -12,7 +12,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/web/ng/ServerTests.cpp b/tests/unit/web/ng/ServerTests.cpp index 7eb57f611..21faffebd 100644 --- a/tests/unit/web/ng/ServerTests.cpp +++ b/tests/unit/web/ng/ServerTests.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/web/ng/impl/ConnectionHandlerTests.cpp b/tests/unit/web/ng/impl/ConnectionHandlerTests.cpp index fa28f9a8a..28d4cb155 100644 --- a/tests/unit/web/ng/impl/ConnectionHandlerTests.cpp +++ b/tests/unit/web/ng/impl/ConnectionHandlerTests.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/web/ng/impl/ErrorHandlingTests.cpp b/tests/unit/web/ng/impl/ErrorHandlingTests.cpp index dccd8042d..f40721c35 100644 --- a/tests/unit/web/ng/impl/ErrorHandlingTests.cpp +++ b/tests/unit/web/ng/impl/ErrorHandlingTests.cpp @@ -6,7 +6,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/web/ng/impl/HttpConnectionTests.cpp b/tests/unit/web/ng/impl/HttpConnectionTests.cpp index bbe8e7728..c573f9473 100644 --- a/tests/unit/web/ng/impl/HttpConnectionTests.cpp +++ b/tests/unit/web/ng/impl/HttpConnectionTests.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include