-
Notifications
You must be signed in to change notification settings - Fork 201
/
.clang-format
97 lines (82 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
---
Language: Cpp
BasedOnStyle: WebKit
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: 'true'
AlignConsecutiveDeclarations: 'true'
AlignEscapedNewlines: Left
AlignTrailingComments: 'true'
AllowAllConstructorInitializersOnNextLine: 'false'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: 'false'
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: 'false'
BinPackParameters: 'false'
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: 'true'
AfterEnum: 'true'
AfterFunction: 'true'
AfterStruct: 'true'
AfterUnion: 'true'
BreakBeforeTernaryOperators: 'true'
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ColumnLimit: '100'
FixNamespaceComments: 'true'
IncludeBlocks: Regroup
IncludeCategories:
# Desired final ordering:
# 0. Glew must be included before any other GL header
# 1. Related header
# 2. All private headers
# 3. All public headers from this repository (maya-usd)
# 4. UsdUfe headers
# 5. Pixar + USD headers
# 6. Autodesk + Maya headers
# 7. Other libraries' headers
# 8. C++ standard library headers
# 9. C system headers
# 10. Conditional includes
# 0. GL loaders must be included before any other GL header
# Negative priority puts it above the default IncludeIsMainRegex
- Regex: '<pxr/imaging/(garch/glApi.h|glf/glew.h)>'
Priority: -1
# 1. Related header
# Handled by the default IncludeIsMainRegex regex, and auto-assigned
# Priority 0
# 3. All public headers from this repository (maya-usd)
- Regex: '^<(mayaUsd.*|hdMaya|AL|usdMaya)/'
Priority: 3
# 4. UsdUfe library headers
- Regex: '^<usdUfe/'
Priority: 4
# 5. Pixar + USD headers
- Regex: '^<pxr/'
Priority: 5
# 6. Autodesk + Maya headers
- Regex: '^<(maya|ufe)/'
Priority: 6
# 8. C++ standard library headers
# angle brackets, no directory, no extension
- Regex: '^<[A-Za-z0-9_-]+>$'
Priority: 8
# 9. C system headers
# angle brackets, no directory, end with ".h"
- Regex: '^<[A-Za-z0-9_-]+\.h>$'
Priority: 9
# 2. All private headers
- Regex: '^"'
Priority: 2
# 7. Other libraries' headers
- Regex: '^<'
Priority: 7
# 10. Conditional includes
# Not reordered by clang-format, we need to manually make sure these come last
MaxEmptyLinesToKeep: '1'
NamespaceIndentation: None
UseTab: Never
...