Skip to content

Commit 10218d6

Browse files
committed
Sort and cleanup .clang-format file
1 parent 63087dc commit 10218d6

File tree

1 file changed

+38
-41
lines changed

1 file changed

+38
-41
lines changed

.clang-format

Lines changed: 38 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,64 @@
11
---
2-
BasedOnStyle: Google
32
AccessModifierOffset: -2
4-
ConstructorInitializerIndentWidth: 2
53
AlignEscapedNewlinesLeft: false
64
AlignTrailingComments: true
75
AllowAllParametersOfDeclarationOnNextLine: false
6+
AllowShortFunctionsOnASingleLine: None
87
AllowShortIfStatementsOnASingleLine: false
98
AllowShortLoopsOnASingleLine: false
10-
AllowShortFunctionsOnASingleLine: None
11-
AlwaysBreakTemplateDeclarations: true
129
AlwaysBreakBeforeMultilineStrings: false
10+
AlwaysBreakTemplateDeclarations: true
11+
BasedOnStyle: Google
12+
BinPackParameters: true
13+
14+
BraceWrapping: # Control of individual brace wrapping cases
15+
AfterCaseLabel: 'true'
16+
AfterClass: 'true'
17+
AfterControlStatement: 'true'
18+
AfterEnum: 'true'
19+
AfterFunction: 'true'
20+
AfterNamespace: 'true'
21+
AfterStruct: 'true'
22+
AfterUnion: 'true'
23+
BeforeCatch: 'true'
24+
BeforeElse: 'true'
25+
IndentBraces: 'false'
26+
1327
BreakBeforeBinaryOperators: false
1428
BreakBeforeTernaryOperators: false
1529
BreakConstructorInitializersBeforeComma: true
16-
BinPackParameters: true
17-
ColumnLimit: 120
30+
BreakBeforeBraces: Custom # Configure each individual brace in BraceWrapping
31+
32+
ColumnLimit: 120
1833
ConstructorInitializerAllOnOneLineOrOnePerLine: true
34+
ConstructorInitializerIndentWidth: 2
35+
ContinuationIndentWidth: 4
36+
Cpp11BracedListStyle: false
1937
DerivePointerBinding: false
20-
PointerBindsToType: true
2138
ExperimentalAutoDetectBinPacking: false
2239
IndentCaseLabels: true
40+
IndentFunctionDeclarationAfterType: false
2341
IndentPPDirectives: AfterHash
42+
IndentWidth: 2
2443
MaxEmptyLinesToKeep: 1
2544
NamespaceIndentation: None
2645
ObjCSpaceBeforeProtocolList: true
2746
PenaltyBreakBeforeFirstCallParameter: 19
2847
PenaltyBreakComment: 60
29-
PenaltyBreakString: 1
3048
PenaltyBreakFirstLessLess: 1000
49+
PenaltyBreakString: 1
3150
PenaltyExcessCharacter: 1000
3251
PenaltyReturnTypeOnItsOwnLine: 90
33-
SpacesBeforeTrailingComments: 2
34-
Cpp11BracedListStyle: false
35-
Standard: Auto
36-
IndentWidth: 2
37-
TabWidth: 2
38-
UseTab: Never
39-
IndentFunctionDeclarationAfterType: false
40-
SpacesInParentheses: false
41-
SpacesInAngles: false
42-
SpaceInEmptyParentheses: false
43-
SpacesInCStyleCastParentheses: false
44-
SpaceAfterControlStatementKeyword: true
45-
SpaceBeforeAssignmentOperators: true
46-
ContinuationIndentWidth: 4
52+
PointerBindsToType: true
4753
SortIncludes: false
4854
SpaceAfterCStyleCast: false
49-
50-
# Configure each individual brace in BraceWrapping
51-
BreakBeforeBraces: Custom
52-
53-
# Control of individual brace wrapping cases
54-
BraceWrapping: {
55-
AfterCaseLabel: 'true'
56-
AfterClass: 'true'
57-
AfterControlStatement: 'true'
58-
AfterEnum : 'true'
59-
AfterFunction : 'true'
60-
AfterNamespace : 'true'
61-
AfterStruct : 'true'
62-
AfterUnion : 'true'
63-
BeforeCatch : 'true'
64-
BeforeElse : 'true'
65-
IndentBraces : 'false'
66-
}
67-
...
55+
SpaceAfterControlStatementKeyword: true
56+
SpaceBeforeAssignmentOperators: true
57+
SpaceInEmptyParentheses: false
58+
SpacesBeforeTrailingComments: 2
59+
SpacesInAngles: false
60+
SpacesInCStyleCastParentheses: false
61+
SpacesInParentheses: false
62+
Standard: Auto
63+
TabWidth: 2
64+
UseTab: Never

0 commit comments

Comments
 (0)