-
Notifications
You must be signed in to change notification settings - Fork 39
/
.clang-format
131 lines (131 loc) · 3.75 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AlignArrayOfStructures: Right
# AlignConsecutiveAssignments: None
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: true
AcrossComments: true
# AlignConsecutiveDeclarations: None
# AlignConsecutiveMacros
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: true
# [v16+]
# AlignTrailingComments:
# Kind: Always
# OverEmptyLines: 2
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always # Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All # Empty
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All # Empty
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: Both
# [v16+]
# BreakAfterAttributes: Always
BreakBeforeBinaryOperators: NonAssignment # All
# break before function scope (incl. lambdas) and else statements
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
# [v16+]
# BraceWrappingAfterControlStatementStyle: MultiLine
AfterEnum: false
AfterFunction: true
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeConceptDeclarations: Always
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 80
# CommentPragmas regex
CompactNamespaces: false
ContinuationIndentWidth: 2
Cpp11BracedListStyle: true
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: false
IncludeBlocks: Merge
# IncludeCategories regex [maybe useful for tool/hone]
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: false
IndentGotoLabels: true
# IndentPPDirectives: BeforeHash [messes up includes, nice w/modules]
IndentRequiresClause: false
IndentWidth: 2
# [v16+]
# InsertNewlineAtEOF: true
# [v16+]
# IntegerLiteralSeparator:
# Binary: 4
# Decimal: 3
# Hex: 2
# [v16+]
# LineEnding: LF
NamespaceIndentation: None
PackConstructorInitializers: Never
PenaltyBreakOpenParenthesis: 0
PenaltyBreakBeforeFirstCallParameter: 0
PointerAlignment: Left
QualifierAlignment: Custom
# [bad docs? 'friend' does not work]
QualifierOrder: ['inline', 'static', 'constexpr', 'volatile', 'restrict', 'type', 'const']
ReferenceAlignment: Left
ReflowComments: true
RequiresClausePosition: OwnLine
# [v16+]
# RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Always
SortIncludes: CaseInsensitive
# SortIncludes: true
# [bad docs?]
# SortUsingDeclarations: LexicographicNumeric
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: true # false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: true
SpaceBeforeCpp11BracedList: false # true
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false # true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
# SpacesInLineCommentPrefix
SpacesInSquareBrackets: false
Standard: Latest
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements # Never
TabWidth: 2
UseTab: Never