-
-
Notifications
You must be signed in to change notification settings - Fork 984
Expand file tree
/
Copy path.clang-format
More file actions
75 lines (66 loc) · 1.82 KB
/
Copy path.clang-format
File metadata and controls
75 lines (66 loc) · 1.82 KB
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
# OpenMVS approximate formatting rules inferred from libs/MVS and libs/Common
---
Language: Cpp
BasedOnStyle: LLVM
# Indentation
UseTab: ForIndentation
IndentWidth: 4
TabWidth: 4
ContinuationIndentWidth: 4
AccessModifierOffset: 0
NamespaceIndentation: None
IndentPPDirectives: BeforeHash
# Line breaking
ColumnLimit: 0 # preserve long lines; project has many >120
ReflowComments: false
KeepEmptyLinesAtTheStartOfBlocks: false
# Braces
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterStruct: true
AfterFunction: true
AfterEnum: false
AfterControlStatement: false
AfterNamespace: false
BeforeElse: false
BeforeCatch: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
# Pointers/references
DerivePointerAlignment: false
PointerAlignment: Left # Type*& var, const Type& name
# Short constructs on one line
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
# Spacing
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpaceAfterCStyleCast: false
SpaceInEmptyParentheses: false
SpaceAfterTemplateKeyword: true
Cpp11BracedListStyle: true
# Wrapping/alignment
BinPackParameters: true
BinPackArguments: true
BreakConstructorInitializers: AfterColon
ConstructorInitializerAllOnOneLineOrOnePerLine: false
BreakBeforeBinaryOperators: NonAssignment
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignTrailingComments: false
# Includes & usings
SortIncludes: false
IncludeBlocks: Preserve
SortUsingDeclarations: false
# Macros
ForEachMacros: ['FOREACH']