From 92f07a66fcb2f5e5f9d7d85da5c29c5c73cf491f Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 6 Sep 2025 15:12:34 +0200 Subject: [PATCH] Fix .clang-format (#1177) * Added coderabbitai configuration * Fix .clang-format --------- Co-authored-by: John Wellbelove Co-authored-by: John Wellbelove --- .clang-format | 10 ++++++++-- .coderabbit.yaml | 1 + include/etl/chrono.h | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.clang-format b/.clang-format index 8a409985..39cbfaf3 100644 --- a/.clang-format +++ b/.clang-format @@ -5,10 +5,16 @@ Language: Cpp -SortIncludes: true - BasedOnStyle: Chromium +SortIncludes: true +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '^(<|")(.*/)?platform\.h(>|")$' + Priority: 1 + - Regex: '.*' + Priority: 2 + BinPackParameters: false BitFieldColonSpacing: Both diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 259a9798..b3565c23 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -197,3 +197,4 @@ reviews: chat: art: false auto_reply: true + diff --git a/include/etl/chrono.h b/include/etl/chrono.h index 437d2856..4fe6cec5 100644 --- a/include/etl/chrono.h +++ b/include/etl/chrono.h @@ -67,6 +67,8 @@ namespace etl using time_t = ::time_t; } +// clang-format off +// Keeping the order is important here #include "private/chrono/last_spec.h" #include "private/chrono/duration.h" #include "private/chrono/time_point.h" @@ -83,6 +85,7 @@ namespace etl #include "private/chrono/hh_mm_ss.h" #include "private/chrono/operators.h" #include "private/chrono/time_zone.h" +// clang-format on namespace etl {