Skip to content

Commit 418dfb4

Browse files
committed
Add .clang-format
1 parent 3ade07b commit 418dfb4

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed

.clang-format

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
AccessModifierOffset: -4
3+
AlignAfterOpenBracket: DontAlign
4+
AlignConsecutiveAssignments: None
5+
AlignConsecutiveDeclarations: None
6+
AlignOperands: false
7+
AlignTrailingComments: true
8+
AllowAllParametersOfDeclarationOnNextLine: true
9+
AllowShortBlocksOnASingleLine: Empty
10+
AllowShortCaseLabelsOnASingleLine: true
11+
AllowShortFunctionsOnASingleLine: Empty
12+
AllowShortIfStatementsOnASingleLine: false
13+
AllowShortLoopsOnASingleLine: false
14+
AlwaysBreakAfterDefinitionReturnType: None
15+
AlwaysBreakAfterReturnType: None
16+
AlwaysBreakBeforeMultilineStrings: true
17+
AlwaysBreakTemplateDeclarations: Yes
18+
BasedOnStyle: None
19+
BinPackArguments: true
20+
BinPackParameters: true
21+
BreakBeforeBinaryOperators: All
22+
BreakBeforeBraces: Allman
23+
BreakBeforeTernaryOperators: true
24+
BreakConstructorInitializersBeforeComma: true
25+
ColumnLimit: 120
26+
CommentPragmas: '^ IWYU pragma:'
27+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
28+
ConstructorInitializerIndentWidth: 4
29+
ContinuationIndentWidth: 4
30+
Cpp11BracedListStyle: true
31+
DerivePointerAlignment: false
32+
DisableFormat: false
33+
ExperimentalAutoDetectBinPacking: false
34+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
35+
IncludeBlocks: Preserve
36+
IncludeCategories:
37+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
38+
Priority: 2
39+
- Regex: '^(<|"(gtest|isl|json)/)'
40+
Priority: 3
41+
- Regex: '.*'
42+
Priority: 1
43+
IndentCaseLabels: false
44+
IndentWidth: 4
45+
IndentWrappedFunctionNames: false
46+
KeepEmptyLinesAtTheStartOfBlocks: true
47+
Language: Cpp
48+
MacroBlockBegin: ''
49+
MacroBlockEnd: ''
50+
MaxEmptyLinesToKeep: 1
51+
NamespaceIndentation: None
52+
ObjCBlockIndentWidth: 4
53+
ObjCSpaceAfterProperty: true
54+
ObjCSpaceBeforeProtocolList: true
55+
PenaltyBreakBeforeFirstCallParameter: 19
56+
PenaltyBreakComment: 300
57+
PenaltyBreakFirstLessLess: 120
58+
PenaltyBreakString: 1000
59+
PenaltyExcessCharacter: 1000000
60+
PenaltyReturnTypeOnItsOwnLine: 60
61+
PointerAlignment: Left
62+
ReflowComments: true
63+
SeparateDefinitionBlocks: Always
64+
SortIncludes: CaseSensitive
65+
SpaceAfterCStyleCast: true
66+
SpaceBeforeAssignmentOperators: true
67+
SpaceBeforeParens: ControlStatements
68+
SpaceInEmptyParentheses: false
69+
SpacesBeforeTrailingComments: 1
70+
SpacesInAngles: false
71+
SpacesInCStyleCastParentheses: false
72+
SpacesInContainerLiterals: true
73+
SpacesInParentheses: false
74+
SpacesInSquareBrackets: false
75+
Standard: c++14
76+
TabWidth: 4
77+
UseTab: Never
78+
...

0 commit comments

Comments
 (0)