-
Notifications
You must be signed in to change notification settings - Fork 26
/
.clang-format
98 lines (96 loc) · 3.04 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
# options: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Based on: https://github.com/git/git/blob/master/.clang-format
---
Language: Cpp
Standard: c++17
IndentWidth: 4
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: false
IndentCaseLabels: false
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 4
AccessModifierOffset: -4
Cpp11BracedListStyle: true
ColumnLimit: 99
IncludeBlocks: Preserve
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: Always
FixNamespaceComments: false
UseTab: Never
ForEachMacros: ['FOREACH']
NamespaceIndentation: All
CompactNamespaces: true
PackConstructorInitializers: Never
BinPackArguments: false
BinPackParameters: false
MaxEmptyLinesToKeep: 2
DerivePointerAlignment: false
PointerAlignment: Middle
ReferenceAlignment: Middle
QualifierAlignment: Left
ReflowComments: true
RemoveBracesLLVM: false
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
SeparateDefinitionBlocks: Leave
SortIncludes: false # CaseInsensitive
SortUsingDeclarations: false
UseCRLF: false
ShortNamespaceLines: 0
ExperimentalAutoDetectBinPacking: false
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortEnumsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: Inline
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
AlwaysBreakBeforeMultilineStrings: false
SpacesInAngles: Never
SpacesInSquareBrackets: false
SpaceInEmptyParentheses: false
SpacesInParentheses: false
SpacesInContainerLiterals: false
SpacesInConditionalStatement: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeSquareBrackets: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpacesBeforeTrailingComments: 2
SpaceBeforeParens: ControlStatementsExceptControlMacros
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: true
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
BreakBeforeBraces: Allman
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: AlignAfterOperator
AlignTrailingComments: true
AlignArrayOfStructures: None # Right
AlignAfterOpenBracket: Align # BlockIndent
AlignConsecutiveAssignments: false
PenaltyBreakAssignment: 10
PenaltyBreakBeforeFirstCallParameter: 20
PenaltyBreakOpenParenthesis: 20
PenaltyBreakComment: 160
PenaltyBreakFirstLessLess: 0
PenaltyBreakString: 120
PenaltyExcessCharacter: 250
PenaltyReturnTypeOnItsOwnLine: 50
PenaltyIndentedWhitespace: 0
# InsertBraces: true # clang-format 15
# BreakArrays: false # clang-format 16
# RemoveSemicolon: true # clang-format 16
# BreakAfterAttributes: Never # clang-format 16
# Macros: # clang-format 17
# - UPCAST_FROM_TYPENAME(name)=case name: break;