From 65501f488ea4f77322888fb5376e89d9093f4556 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Tue, 29 Jun 2021 08:14:51 +0200 Subject: [PATCH] Simplify header categorization rules --- .clang-format | 6 ++++-- src/InodeCache.cpp | 3 ++- src/ZstdDecompressor.hpp | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.clang-format b/.clang-format index 29f13ad43..67f0665b2 100644 --- a/.clang-format +++ b/.clang-format @@ -28,9 +28,11 @@ IncludeCategories: Priority: 1 - Regex: '^["<]third_party/' Priority: 4 - - Regex: '^<(sddl\.h)>$' + # System headers: + - Regex: '\.h>$' Priority: 5 - - Regex: '^<(algorithm|any|array|atomic|bitset|cassert|ccomplex|cctype|cerrno|cfenv|cfloat|chrono|cinttypes|ciso646|climits|clocale|cmath|codecvt|complex|condition_variable|csetjmp|csignal|cstdalign|cstdarg|cstdbool|cstddef|cstdint|cstdio|cstdlib|cstring|ctgmath|ctime|cuchar|cwchar|cwctype|deque|exception|execution|filesystem|forward_list|fstream|functional|future|initializer_list|iomanip|ios|iosfwd|iostream|istream|iterator|limits|list|locale|map|memory|memory_resource|mutex|new|numeric|optional|ostream|queue|random|ratio|regex|scoped_allocator|set|shared_mutex|sstream|stack|stdexcept|streambuf|string|string_view|strstream|system_error|thread|tuple|type_traits|typeindex|typeinfo|unordered_map|unordered_set|utility|valarray|variant|vector)>$' + # C++ headers: + - Regex: '^<[^.]+>$' Priority: 6 - Regex: '^"' Priority: 2 diff --git a/src/InodeCache.cpp b/src/InodeCache.cpp index bcb11ce64..34f5577d4 100644 --- a/src/InodeCache.cpp +++ b/src/InodeCache.cpp @@ -28,9 +28,10 @@ #include "Util.hpp" #include "fmtmacros.hpp" -#include #include #include + +#include #include // The inode cache resides on a file that is mapped into shared memory by diff --git a/src/ZstdDecompressor.hpp b/src/ZstdDecompressor.hpp index 8f85ce68a..80533c181 100644 --- a/src/ZstdDecompressor.hpp +++ b/src/ZstdDecompressor.hpp @@ -22,9 +22,10 @@ #include "Decompressor.hpp" -#include #include +#include + // A decompressor of a Zstandard stream. class ZstdDecompressor : public Decompressor { -- 2.47.3