-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
93 lines (83 loc) · 2.29 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
---
BasedOnStyle: Google
Standard: Auto
UseTab: Never
ColumnLimit: 100
MaxEmptyLinesToKeep: 1
# Indent length values
IndentWidth: 4
AccessModifierOffset: -2
ContinuationIndentWidth: 4
ConstructorInitializerIndentWidth: 2
#Indent rules
IndentCaseLabels: true
IndentFunctionDeclarationAfterType: false
NamespaceIndentation: None
#Spacing rules
SpaceAfterControlStatementKeyword: true
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInContainerLiterals: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
Cpp11BracedListStyle: false
PointerBindsToType: true
#Line break rules
BreakConstructorInitializers: AfterColon
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: false
BreakConstructorInitializersBeforeComma: false
BreakBeforeConceptDeclarations: true
IndentRequires: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BinPackArguments: false
BinPackParameters: false
ExperimentalAutoDetectBinPacking: false
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 60
PenaltyBreakFirstLessLess: 1000
PenaltyBreakString: 1
PenaltyExcessCharacter: 1000
PenaltyReturnTypeOnItsOwnLine: 90
# Brace wrapping rules
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: 'true'
AfterControlStatement: 'true'
AfterEnum : 'true'
AfterFunction : 'true'
AfterNamespace : 'true'
AfterStruct : 'true'
AfterUnion : 'true'
BeforeCatch : 'true'
BeforeElse : 'true'
# BeforeLambdaBody : 'true'
IndentBraces : 'false'
SplitEmptyFunction: 'false'
SplitEmptyRecord: 'false'
SplitEmptyNamespace: 'false'
# Include sorting rules
IncludeBlocks: Regroup
SortIncludes: true
IncludeCategories:
- Regex: '^<[a-z_]+>'
Priority: 1
- Regex: '^<(.*\.(h|hpp)|[[:alnum:]\/_]*)>'
Priority: 2
- Regex: '^".*\.(h|hpp)"'
Priority: 3
#Misc rules
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AlignAfterOpenBracket: Align
DerivePointerBinding: false
FixNamespaceComments: true