-
Notifications
You must be signed in to change notification settings - Fork 7
/
.clang-format
58 lines (57 loc) · 1.56 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
---
BasedOnStyle: Google
UseTab: Never
IndentWidth: 4
ContinuationIndentWidth: 4
AccessModifierOffset: -4
ColumnLimit: 100
Language: Cpp
Standard: c++17
AlignAfterOpenBracket: Align
AlignEscapedNewlines: Right
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortIfStatementsOnASingleLine: Never
BinPackArguments: false
BinPackParameters: false
BreakBeforeTernaryOperators: true
CommentPragmas: 'NOLINT(NEXTLINE|BEGIN|END)?\[.*\]'
FixNamespaceComments: true
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^[<"]Python\.h[">]$'
Priority: 2
CaseSensitive: true
- Regex: '^[<"]pybind11/.*[">]$'
Priority: 3
CaseSensitive: true
- Regex: '^<[[:alnum:]_/]+(\.h)?>$'
Priority: 1
- Regex: '^"optree/'
Priority: 4
CaseSensitive: true
- Regex: ".*"
Priority: 5
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentPPDirectives: None
InsertBraces: true
InsertTrailingCommas: Wrapped
LambdaBodyIndentation: Signature
MacroBlockBegin: '^Py_BEGIN_(ALLOW_THREADS|CRITICAL_SECTION(2)?(_MUT)?)$'
MacroBlockEnd: '^Py_END_(ALLOW_THREADS|CRITICAL_SECTION(2)?(_MUT)?)$'
PackConstructorInitializers: NextLine
PointerAlignment: Right
QualifierAlignment: Custom
QualifierOrder:
[friend, static, inline, const, constexpr, volatile, type, restrict]
ReferenceAlignment: Right
RemoveParentheses: ReturnStatement
RemoveSemicolon: true
SeparateDefinitionBlocks: Leave
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SpaceAroundPointerQualifiers: Both
StatementAttributeLikeMacros:
- Py_ALWAYS_INLINE
- Py_NO_INLINE