Skip to content

Commit b799390

Browse files
committed
Update .clang-format: enable include sorting.
1 parent 1bb9b7d commit b799390

File tree

1 file changed

+34
-8
lines changed

1 file changed

+34
-8
lines changed

‎.clang-format

+34-8
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,20 @@ Language: Cpp
33
# BasedOnStyle: Google
44
AccessModifierOffset: -1
55
AlignAfterOpenBracket: Align
6-
AlignConsecutiveMacros: false
7-
AlignConsecutiveAssignments: false
8-
AlignConsecutiveDeclarations: false
6+
AlignArrayOfStructures: None
7+
AlignConsecutiveMacros: None
8+
AlignConsecutiveAssignments: None
9+
AlignConsecutiveBitFields: None
10+
AlignConsecutiveDeclarations: None
911
AlignEscapedNewlines: Left
10-
AlignOperands: true
12+
AlignOperands: Align
1113
AlignTrailingComments: true
1214
AllowAllArgumentsOnNextLine: true
1315
AllowAllConstructorInitializersOnNextLine: true
1416
AllowAllParametersOfDeclarationOnNextLine: true
1517
AllowShortBlocksOnASingleLine: Never
1618
AllowShortCaseLabelsOnASingleLine: false
19+
AllowShortEnumsOnASingleLine: true
1720
AllowShortFunctionsOnASingleLine: None # All
1821
AllowShortIfStatementsOnASingleLine: Never # WithoutElse
1922
AllowShortLambdasOnASingleLine: Inline # All
@@ -24,10 +27,11 @@ AlwaysBreakBeforeMultilineStrings: true
2427
AlwaysBreakTemplateDeclarations: Yes
2528
BinPackArguments: true
2629
BinPackParameters: true
30+
BitFieldColonSpacing: Both
2731
BraceWrapping:
2832
AfterCaseLabel: false
2933
AfterClass: false
30-
AfterControlStatement: false
34+
AfterControlStatement: Never
3135
AfterEnum: false
3236
AfterFunction: false
3337
AfterNamespace: false
@@ -37,12 +41,15 @@ BraceWrapping:
3741
AfterExternBlock: false
3842
BeforeCatch: false
3943
BeforeElse: false
44+
BeforeLambdaBody: false
45+
BeforeWhile: false
4046
IndentBraces: false
4147
SplitEmptyFunction: true
4248
SplitEmptyRecord: true
4349
SplitEmptyNamespace: true
4450
BreakBeforeBinaryOperators: None
4551
BreakBeforeBraces: Attach
52+
BreakBeforeConceptDeclarations: true
4653
BreakBeforeInheritanceComma: true # false
4754
BreakInheritanceList: BeforeComma # BeforeColon
4855
BreakBeforeTernaryOperators: true
@@ -60,21 +67,30 @@ Cpp11BracedListStyle: true
6067
DeriveLineEnding: true
6168
DerivePointerAlignment: true
6269
DisableFormat: false
70+
EmptyLineAfterAccessModifier: Never
71+
EmptyLineBeforeAccessModifier: LogicalBlock
6372
ExperimentalAutoDetectBinPacking: false
6473
FixNamespaceComments: true
6574
ForEachMacros:
6675
- Q_FOREACH_THIS_LIST_MUST_BE_NON_EMPTY
6776
IncludeBlocks: Preserve
68-
#IndentCaseBlocks: false
77+
IncludeCategories:
78+
- Regex: '.*'
79+
Priority: 0
80+
IndentAccessModifiers: false
81+
IndentCaseBlocks: false
6982
IndentCaseLabels: true
83+
IndentExternBlock: AfterExternBlock
7084
IndentGotoLabels: true
7185
IndentPPDirectives: None
86+
IndentRequires: false
7287
IndentWidth: 2
7388
IndentWrappedFunctionNames: false
7489
# InsertTrailingCommas: None
7590
# JavaScriptQuotes: Leave
7691
# JavaScriptWrapImports: true
7792
KeepEmptyLinesAtTheStartOfBlocks: false
93+
LambdaBodyIndentation: Signature
7894
MacroBlockBegin: ''
7995
MacroBlockEnd: ''
8096
MaxEmptyLinesToKeep: 1
@@ -91,15 +107,22 @@ PenaltyBreakFirstLessLess: 120
91107
PenaltyBreakString: 1000
92108
PenaltyBreakTemplateDeclaration: 10
93109
PenaltyExcessCharacter: 1000000
110+
PenaltyIndentedWhitespace: 0
94111
PenaltyReturnTypeOnItsOwnLine: 200
95112
PointerAlignment: Right
113+
PPIndentWidth: -1
114+
ReferenceAlignment: Pointer
96115
ReflowComments: false # true
97-
SortIncludes: false # disabled, because we need case insensitive sort
116+
ShortNamespaceLines: 0 # 1
117+
SortIncludes: CaseInsensitive # CaseSensitive
118+
# SortJavaStaticImport: Before
98119
SortUsingDeclarations: false # true
99120
SpaceAfterCStyleCast: false
100121
SpaceAfterLogicalNot: false
101122
SpaceAfterTemplateKeyword: true
123+
SpaceAroundPointerQualifiers: Default
102124
SpaceBeforeAssignmentOperators: true
125+
SpaceBeforeCaseColon: false
103126
SpaceBeforeCpp11BracedList: false
104127
SpaceBeforeCtorInitializerColon: true
105128
SpaceBeforeInheritanceColon: true
@@ -109,10 +132,13 @@ SpaceBeforeSquareBrackets: false
109132
SpaceInEmptyBlock: false
110133
SpaceInEmptyParentheses: false
111134
SpacesBeforeTrailingComments: 2
112-
SpacesInAngles: false
135+
SpacesInAngles: Never
113136
SpacesInConditionalStatement: false
114137
SpacesInContainerLiterals: true
115138
SpacesInCStyleCastParentheses: false
139+
SpacesInLineCommentPrefix:
140+
Minimum: 1
141+
Maximum: 1 # -1
116142
SpacesInParentheses: false
117143
SpacesInSquareBrackets: false
118144
Standard: Auto

0 commit comments

Comments
 (0)