-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
119 lines (106 loc) · 3.46 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#
# aGrUM clang-format specification (version clang-format-17.06)
# Pierre-Henri Wuillemin - 2016-2024
#
BasedOnStyle: LLVM
Language: Cpp
Standard: c++20
ColumnLimit: 100
MaxEmptyLinesToKeep: 2
KeepEmptyLinesAtTheStartOfBlocks: false
ReflowComments: true
CommentPragmas: "\\@headerfile"
IndentPPDirectives: AfterHash
SeparateDefinitionBlocks: Always
BreakBeforeBraces: Attach
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBinaryOperators: All
BreakBeforeInheritanceComma: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BreakStringLiterals: true
BreakConstructorInitializers: AfterColon
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakAfterReturnType: None
BreakInheritanceList: AfterColon
CompactNamespaces: false
FixNamespaceComments: true
IndentWidth: 2
ContinuationIndentWidth: 4
UseTab: Never
AccessModifierOffset: 0
IndentCaseLabels: true
IndentWrappedFunctionNames: true
NamespaceIndentation: All
EmptyLineBeforeAccessModifier: Always
SpacesInAngles: true
Cpp11BracedListStyle: true
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceAfterCStyleCast: false
SpacesInCStyleCastParentheses: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 3
SpacesInContainerLiterals: false
SpaceBeforeRangeBasedForLoopColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeCpp11BracedList: false
SpaceAfterLogicalNot: false
SpaceBeforeCaseColon: true
PointerAlignment: Left
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: Consecutive
AlignConsecutiveMacros: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignOperands: AlignAfterOperator
AlignTrailingComments:
Kind: Always
OverEmptyLines: 2
AllowAllParametersOfDeclarationOnNextLine: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AlignEscapedNewlines: Left
BinPackArguments: false
BinPackParameters: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLoopsOnASingleLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
LambdaBodyIndentation: Signature
SortUsingDeclarations: false
SortIncludes: CaseInsensitive
IncludeBlocks: Regroup
# see https://www.regextester.com/
IncludeCategories:
- Regex: '<[[:alnum:].]+>'
Priority: 1
- Regex: '<gumtest\/AgrumTestSuite\.h>'
Priority: 2
- Regex: '<gumtest\/utils\.h>'
Priority: 2
- Regex: '<agrum\/agrum\.h>'
Priority: 3
- Regex: '<agrum\/config\.h>'
Priority: 3
- Regex: '<gumtest\/AgrumApproximationUtils\.h>'
Priority: 7
- Regex: '<agrum\/tools\/[[:alnum:]|\/]+\.h>'
Priority: 4
- Regex: '<agrum\/[[:alnum:]|\/]+\.h>'
Priority: 5
- Regex: '"[^.]+\.h"'
Priority: 6
MacroBlockBegin: '^GUM_APPROX_TEST_BEGIN_ITERATION'
MacroBlockEnd: '^GUM_APPROX_TEST_END_ITERATION'
StatementMacros: ['TS_ASSERT_EQUALS','TS_ASSERT_DIFFERS','TS_ASSERT_THROWS','TS_ASSERT',
'GUM_CHECKPOINT','GUM_TRACE','GUM_TRACE_VAR',
'GUM_ASSERT',
'GUM_CONSTRUCTOR','GUM_DESTRUCTOR','GUM_CONS_CPY','GUM_CONS_MOV','GUM_OP_CPY','GUM_OP_MOV',
'GUM_DEBUG_ONLY']