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 {