Skip to content

Commit d7b4e73

Browse files
committed
Allow clang-format to reorder includes
1 parent a401b75 commit d7b4e73

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.clang-format

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ DisableFormat: false
4949
ExperimentalAutoDetectBinPacking: false
5050
FixNamespaceComments: true
5151
# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
52+
IncludeBlocks: Regroup
53+
IncludeCategories:
54+
- Regex: '>$'
55+
Priority: -3
56+
- Regex: '.h>$'
57+
Priority: -2
58+
- Regex: '^\".*/.*\"$'
59+
Priority: -1
60+
- Regex: '^\"[^/]*\"$'
61+
Priority: 0
5262
IndentCaseLabels: true
5363
IndentWidth: 2
5464
IndentWrappedFunctionNames: false
@@ -70,7 +80,7 @@ PenaltyExcessCharacter: 1000000
7080
PenaltyReturnTypeOnItsOwnLine: 200
7181
PointerAlignment: Left
7282
ReflowComments: false # true
73-
SortIncludes: false # disabled, because we need case insensitive sort
83+
SortIncludes: true
7484
SpaceAfterCStyleCast: false
7585
SpaceAfterTemplateKeyword: true
7686
SpaceBeforeAssignmentOperators: true

0 commit comments

Comments
 (0)