From 4b6042e1f78b4ddde9f0a1f0018c1ddb19499441 Mon Sep 17 00:00:00 2001 From: Felix Weiglhofer <weiglhofer@fias.uni-frankfurt.de> Date: Wed, 13 Jul 2022 12:14:44 +0000 Subject: [PATCH] clang-format: Fix header ordering. Fix a bug in clang-format that causes STL headers that start with a 't' being grouped with Root headers. (Affects for example <type_traits>.) This is caused by regex matching in clang-format being case insensitve by default. The option for case sensitive matching is only introduced with clang-format 12. So as a workaround for clang-format 11 also match a '.h'-suffix for the filenames in these categories. This ensures seperation between Root headers and STL headers. --- .clang-format | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.clang-format b/.clang-format index a920caae32..4e17fee5b3 100644 --- a/.clang-format +++ b/.clang-format @@ -86,9 +86,9 @@ IncludeCategories: Priority: 3 - Regex: '^("|<)Logger.h' Priority: 3 - - Regex: '^("|<)T' + - Regex: '^("|<)T.*\.h' Priority: 4 - - Regex: '^("|<)Rt' + - Regex: '^("|<)Rt.*\.h' Priority: 4 - Regex: '^("|<)boost' Priority: 5 -- GitLab