From 7070ba1b9de40b68504dbb0bb83c816b8d4f60c9 Mon Sep 17 00:00:00 2001 From: thk123 Date: Mon, 23 Apr 2018 15:27:55 +0100 Subject: [PATCH] Sort includes using clang-format In current version of clang-format, this leaves groupings alone and just sorts within the group. For example, given a list of includes like: ``` include "boolbv.h" include include include include include include ``` These will be sorted to: ``` include "boolbv.h" include include include include include include ``` Note the "groups" are left untouched, the ordering occurs within the groups --- .clang-format | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-format b/.clang-format index 6d8c8f0b034..08fa2d1925c 100644 --- a/.clang-format +++ b/.clang-format @@ -84,7 +84,7 @@ NamespaceIndentation: None PenaltyBreakString: 10000 PointerAlignment: Right ReflowComments: 'false' -SortIncludes: 'false' +SortIncludes: 'true' SpaceAfterCStyleCast: 'false' SpaceBeforeAssignmentOperators: 'true' SpaceBeforeParens: Never