-
Notifications
You must be signed in to change notification settings - Fork 4
/
.clang-format
92 lines (78 loc) · 2.51 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
---
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. Pixar + USD headers
# 5. Autodesk + Maya headers
# 6. Other libraries' headers
# 7. C++ standard library headers
# 8. C system headers
# 9. 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.*|mayaHydraLib|AL|usdMaya)/'
Priority: 3
# 4. Pixar + USD headers
- Regex: '^<pxr/'
Priority: 4
# 5. Autodesk + Maya headers
- Regex: '^<(maya|ufe)/'
Priority: 5
# 7. C++ standard library headers
# angle brackets, no directory, no extension
- Regex: '^<[A-Za-z0-9_-]+>$'
Priority: 7
# 8. C system headers
# angle brackets, no directory, end with ".h"
- Regex: '^<[A-Za-z0-9_-]+\.h>$'
Priority: 8
# 2. All private headers
- Regex: '^"'
Priority: 2
# 6. Other libraries' headers
- Regex: '^<'
Priority: 6
# 9. Conditional includes
# Not reordered by clang-format, we need to manually make sure these come last
MaxEmptyLinesToKeep: '1'
NamespaceIndentation: None
UseTab: Never
...