-
Notifications
You must be signed in to change notification settings - Fork 3
/
.clang-format
98 lines (89 loc) · 2.61 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
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
DisableFormat: false
Language: Cpp
Standard: Cpp11
IndentWidth: 4
TabWidth: 4
UseTab: Never
ColumnLimit: 100
ReflowComments: false
SortIncludes: true
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AlignAfterOpenBracket: true
DerivePointerAlignment: false
PointerAlignment: Left
IndentCaseLabels: true
ContinuationIndentWidth: 8
NamespaceIndentation: All
CompactNamespaces: false
FixNamespaceComments: true
AccessModifierOffset: -4
AlwaysBreakBeforeMultilineStrings: false
IndentPPDirectives: AfterHash
AlignConsecutiveMacros: true
SpaceAfterControlStatementKeyword: false
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Cpp11BracedListStyle: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
BinPackArguments: true
BinPackParameters: true
AlwaysBreakAfterReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakTemplateDeclarations: true
BreakConstructorInitializers: BeforeComma
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: false
SpaceBeforeParens: ControlStatements
#SpaceBeforeCpp11BracedList: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakStringLiterals: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterEnum: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BeforeCatch: true
BeforeElse: true
IndentBraces: false
AfterFunction: true
AfterControlStatement: true
# penalties not thought of yet
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 1000
IncludeCategories:
- Regex: '".+"' # Local includes
Priority: 1
- Regex: '<.+\..+>' # Third Party includes
Priority: 2
- Regex: '<[^./]+>' # C++ standard library includes
Priority: 3