-
Notifications
You must be signed in to change notification settings - Fork 831
Expand file tree
/
Copy path.clang-format
More file actions
172 lines (171 loc) · 4.42 KB
/
.clang-format
File metadata and controls
172 lines (171 loc) · 4.42 KB
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# SPDX-License-Identifier: GPL-2.0
#
# clang-format configuration file for Slurm
#
# For more information, see:
#
# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
#
# See https://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting
# for how to integrate with your favorite editor.
---
Language: Json
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: true
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: DontAlign
AlignOperands: Align
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: No
BitFieldColonSpacing: None
BinPackArguments: true
BinPackParameters: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAfterJavaFieldAnnotations: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
UseCRLF: false
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Always
EmptyLineBeforeAccessModifier: Leave
ExperimentalAutoDetectBinPacking: false
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseBlocks: false
IndentCaseLabels: false
IndentExternBlock: AfterExternBlock
IndentPPDirectives: None
IndentGotoLabels: false
IndentWidth: 8
IndentWrappedFunctionNames: true
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: Inner
PPIndentWidth: 8
# Taken from git's rules
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 10
PenaltyBreakComment: 4
PenaltyBreakFirstLessLess: 5
PenaltyBreakOpenParenthesis: 500
PenaltyBreakString: 100000
PenaltyExcessCharacter: 10000000
PenaltyReturnTypeOnItsOwnLine: 10000
PenaltyIndentedWhitespace: 0
AlwaysBreakAfterReturnType: None
PointerAlignment: Right
QualifierAlignment: Custom
QualifierOrder: ['inline', 'volatile', 'static', 'const', 'type' ]
ReferenceAlignment: Right
RemoveBracesLLVM: false
SeparateDefinitionBlocks: Always
SortIncludes: CaseInsensitive
SortUsingDeclarations: false
SpaceAfterCStyleCast: true
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceAroundPointerQualifiers: After
SpaceBeforeCaseColon: false
SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: false
AfterFunctionDefinitionName: false
AfterIfMacros: true
AfterOverloadedOperator: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
ReflowComments: false
SpacesBeforeTrailingComments: 1
SpacesInLineCommentPrefix:
Minimum: 0
Maximum: 1
AlignTrailingComments: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++03
TabWidth: 8
UseTab: ForContinuationAndIndentation
WhitespaceSensitiveMacros:
- 'DB_DEBUG'
- 'XSTRINGIFY'
- 'XSTRINGIFY2'
- 'debug'
- 'debug2'
- 'debug3'
- 'debug4'
- 'debug5'
- 'error'
- 'fatal'
- 'fatal_abort'
- 'info'
- 'log_flag'
- 'log_flag_hex'
- 'log_flag_hex_range'
- 'probe_log'
- 'sched_debug'
- 'sched_debug2'
- 'sched_debug3'
- 'sched_error'
- 'sched_info'
- 'sched_verbose'
- 'verbose'
- 'warning'
...