From fa7e222a23266e258d82e085f62cbf89d20dc8f3 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 20 Nov 2025 16:44:05 +0100 Subject: [PATCH] clang-format: Set Bitcoin Core IncludeCategories Replace the default llvm include categories with the ones specific to Bitcoin Core. --- src/.clang-format | 15 +++++++++------ src/test/blockchain_tests.cpp | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/.clang-format b/src/.clang-format index dd3f1070665..bef63e64d7a 100644 --- a/src/.clang-format +++ b/src/.clang-format @@ -99,17 +99,20 @@ IfMacros: - KJ_IF_MAYBE IncludeBlocks: Preserve IncludeCategories: - - Regex: '^"(llvm|llvm-c|clang|clang-c)/' + - Regex: '^' + Priority: -1 + CaseSensitive: true + - Regex: '^.]*>' Priority: 3 - SortPriority: 0 CaseSensitive: false - Regex: '.*' Priority: 1 - SortPriority: 0 CaseSensitive: false IncludeIsMainRegex: '(Test)?$' IncludeIsMainSourceRegex: '' diff --git a/src/test/blockchain_tests.cpp b/src/test/blockchain_tests.cpp index 5da2841c4dd..2355688460a 100644 --- a/src/test/blockchain_tests.cpp +++ b/src/test/blockchain_tests.cpp @@ -2,8 +2,6 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include - #include #include #include @@ -11,6 +9,8 @@ #include #include +#include + #include using util::ToString;