clang-format: Set Bitcoin Core IncludeCategories

Replace the default llvm include categories with the ones specific to
Bitcoin Core.
This commit is contained in:
MarcoFalke
2025-11-20 16:44:05 +01:00
parent 6b2d17b132
commit fa7e222a23
2 changed files with 11 additions and 8 deletions

View File

@@ -99,17 +99,20 @@ IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
- Regex: '^<bitcoin-build-config\.h>'
Priority: -1
CaseSensitive: true
- Regex: '^<boost/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
CaseSensitive: true
- Regex: '^<Q'
Priority: 2
CaseSensitive: true
- Regex: '^<[^>.]*>'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''

View File

@@ -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 <boost/test/unit_test.hpp>
#include <chain.h>
#include <node/blockstorage.h>
#include <rpc/blockchain.h>
@@ -11,6 +9,8 @@
#include <test/util/setup_common.h>
#include <util/string.h>
#include <boost/test/unit_test.hpp>
#include <cstdlib>
using util::ToString;