Skip to content

Commit 7070ba1

Browse files
author
thk123
committed
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 <util/std_types.h> include <util/std_expr.h> include <util/arith_tools.h> include <util/base_type.h> include <util/pointer_offset_size.h> include <util/c_types.h> ``` These will be sorted to: ``` include "boolbv.h" include <util/arith_tools.h> include <util/base_type.h> include <util/pointer_offset_size.h> include <util/std_expr.h> include <util/std_types.h> include <util/c_types.h> ``` Note the "groups" are left untouched, the ordering occurs within the groups
1 parent 7d247da commit 7070ba1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ NamespaceIndentation: None
8484
PenaltyBreakString: 10000
8585
PointerAlignment: Right
8686
ReflowComments: 'false'
87-
SortIncludes: 'false'
87+
SortIncludes: 'true'
8888
SpaceAfterCStyleCast: 'false'
8989
SpaceBeforeAssignmentOperators: 'true'
9090
SpaceBeforeParens: Never

0 commit comments

Comments
 (0)