Skip to content

Commit 3e919e0

Browse files
committed
add clang-format config
1 parent f8adcb5 commit 3e919e0

File tree

1 file changed

+176
-0
lines changed

1 file changed

+176
-0
lines changed

.clang-format

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
---
2+
Language: Cpp
3+
AccessModifierOffset: -2
4+
AlignAfterOpenBracket: Align
5+
AlignConsecutiveAssignments: true
6+
AlignConsecutiveDeclarations: false
7+
AlignEscapedNewlinesLeft: false
8+
AlignOperands: true
9+
AlignTrailingComments: true
10+
AllowAllParametersOfDeclarationOnNextLine: true
11+
AllowShortBlocksOnASingleLine: false
12+
AllowShortCaseLabelsOnASingleLine: false
13+
AllowShortFunctionsOnASingleLine: Inline
14+
AllowShortIfStatementsOnASingleLine: false
15+
AllowShortLoopsOnASingleLine: false
16+
AlwaysBreakAfterDefinitionReturnType: None
17+
AlwaysBreakAfterReturnType: None
18+
AlwaysBreakBeforeMultilineStrings: false
19+
AlwaysBreakTemplateDeclarations: false
20+
BinPackArguments: true
21+
BinPackParameters: true
22+
BraceWrapping:
23+
AfterClass: false
24+
AfterControlStatement: false
25+
AfterEnum: false
26+
AfterFunction: true
27+
AfterNamespace: false
28+
AfterObjCDeclaration: false
29+
AfterStruct: false
30+
AfterUnion: false
31+
BeforeCatch: false
32+
BeforeElse: false
33+
IndentBraces: false
34+
BreakBeforeBinaryOperators: None
35+
BreakBeforeBraces: Custom
36+
BreakBeforeTernaryOperators: true
37+
BreakConstructorInitializersBeforeComma: true
38+
ColumnLimit: 120
39+
CommentPragmas: '^ IWYU pragma:'
40+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
41+
ConstructorInitializerIndentWidth: 4
42+
ContinuationIndentWidth: 4
43+
Cpp11BracedListStyle: true
44+
DerivePointerAlignment: false
45+
DisableFormat: false
46+
ExperimentalAutoDetectBinPacking: false
47+
ForEachMacros: [ 'xbt_dynar_foreach', 'xbt_dict_foreach' ]
48+
IncludeCategories:
49+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
50+
Priority: 2
51+
- Regex: '^(<|"(gtest|isl|json)/)'
52+
Priority: 3
53+
- Regex: '.*'
54+
Priority: 1
55+
IndentCaseLabels: true
56+
IndentWidth: 2
57+
IndentWrappedFunctionNames: false
58+
KeepEmptyLinesAtTheStartOfBlocks: true
59+
MacroBlockBegin: ''
60+
MacroBlockEnd: ''
61+
MaxEmptyLinesToKeep: 1
62+
NamespaceIndentation: None
63+
ObjCBlockIndentWidth: 2
64+
ObjCSpaceAfterProperty: false
65+
ObjCSpaceBeforeProtocolList: true
66+
PenaltyBreakBeforeFirstCallParameter: 19
67+
PenaltyBreakComment: 300
68+
PenaltyBreakFirstLessLess: 120
69+
PenaltyBreakString: 1000
70+
PenaltyExcessCharacter: 1000000
71+
PenaltyReturnTypeOnItsOwnLine: 60
72+
PointerAlignment: Left
73+
ReflowComments: true
74+
SortIncludes: true
75+
SpaceAfterCStyleCast: false
76+
SpaceBeforeAssignmentOperators: true
77+
SpaceBeforeParens: ControlStatements
78+
SpaceInEmptyParentheses: false
79+
SpacesBeforeTrailingComments: 1
80+
SpacesInAngles: false
81+
SpacesInContainerLiterals: true
82+
SpacesInCStyleCastParentheses: false
83+
SpacesInParentheses: false
84+
SpacesInSquareBrackets: false
85+
Standard: Cpp11
86+
TabWidth: 8
87+
UseTab: Never
88+
---
89+
Language: Java
90+
AccessModifierOffset: -2
91+
AlignAfterOpenBracket: Align
92+
AlignConsecutiveAssignments: true
93+
AlignConsecutiveDeclarations: false
94+
AlignEscapedNewlinesLeft: false
95+
AlignOperands: true
96+
AlignTrailingComments: true
97+
AllowAllParametersOfDeclarationOnNextLine: true
98+
AllowShortBlocksOnASingleLine: false
99+
AllowShortCaseLabelsOnASingleLine: false
100+
AllowShortFunctionsOnASingleLine: Inline
101+
AllowShortIfStatementsOnASingleLine: false
102+
AllowShortLoopsOnASingleLine: false
103+
AlwaysBreakAfterDefinitionReturnType: None
104+
AlwaysBreakAfterReturnType: None
105+
AlwaysBreakBeforeMultilineStrings: false
106+
AlwaysBreakTemplateDeclarations: false
107+
BinPackArguments: true
108+
BinPackParameters: true
109+
BraceWrapping:
110+
AfterClass: false
111+
AfterControlStatement: false
112+
AfterEnum: false
113+
AfterFunction: true
114+
AfterNamespace: false
115+
AfterObjCDeclaration: false
116+
AfterStruct: false
117+
AfterUnion: false
118+
BeforeCatch: false
119+
BeforeElse: false
120+
IndentBraces: false
121+
BreakBeforeBinaryOperators: None
122+
BreakBeforeBraces: Custom
123+
BreakBeforeTernaryOperators: true
124+
BreakConstructorInitializersBeforeComma: true
125+
ColumnLimit: 120
126+
CommentPragmas: '^ IWYU pragma:'
127+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
128+
ConstructorInitializerIndentWidth: 4
129+
ContinuationIndentWidth: 4
130+
Cpp11BracedListStyle: true
131+
DerivePointerAlignment: false
132+
DisableFormat: false
133+
ExperimentalAutoDetectBinPacking: false
134+
ForEachMacros: [ 'xbt_dynar_foreach', 'xbt_dict_foreach' ]
135+
IncludeCategories:
136+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
137+
Priority: 2
138+
- Regex: '^(<|"(gtest|isl|json)/)'
139+
Priority: 3
140+
- Regex: '.*'
141+
Priority: 1
142+
IndentCaseLabels: true
143+
IndentWidth: 2
144+
IndentWrappedFunctionNames: false
145+
KeepEmptyLinesAtTheStartOfBlocks: true
146+
MacroBlockBegin: ''
147+
MacroBlockEnd: ''
148+
MaxEmptyLinesToKeep: 1
149+
NamespaceIndentation: None
150+
ObjCBlockIndentWidth: 2
151+
ObjCSpaceAfterProperty: false
152+
ObjCSpaceBeforeProtocolList: true
153+
PenaltyBreakBeforeFirstCallParameter: 19
154+
PenaltyBreakComment: 300
155+
PenaltyBreakFirstLessLess: 120
156+
PenaltyBreakString: 1000
157+
PenaltyExcessCharacter: 1000000
158+
PenaltyReturnTypeOnItsOwnLine: 60
159+
PointerAlignment: Left
160+
ReflowComments: true
161+
SortIncludes: true
162+
SpaceAfterCStyleCast: false
163+
SpaceBeforeAssignmentOperators: true
164+
SpaceBeforeParens: ControlStatements
165+
SpaceInEmptyParentheses: false
166+
SpacesBeforeTrailingComments: 1
167+
SpacesInAngles: false
168+
SpacesInContainerLiterals: true
169+
SpacesInCStyleCastParentheses: false
170+
SpacesInParentheses: false
171+
SpacesInSquareBrackets: false
172+
Standard: Cpp11
173+
TabWidth: 8
174+
UseTab: Never
175+
...
176+

0 commit comments

Comments
 (0)