-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy path.clang-format
More file actions
64 lines (56 loc) · 1.58 KB
/
.clang-format
File metadata and controls
64 lines (56 loc) · 1.58 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
---
Language: Cpp
# Microsoft generally follows LLVM/Google style with modifications
BasedOnStyle: LLVM
ColumnLimit: 100
IndentWidth: 4
TabWidth: 4
UseTab: Never
# Alignment
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
# Allow
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
# Break
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
# Spacing
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# Comment spacing - ensure at least 2 spaces before comments (cpplint requirement)
SpacesBeforeTrailingComments: 2
ReflowComments: true
# Indentation
IndentCaseLabels: true
IndentPPDirectives: None
NamespaceIndentation: None
# Pointers and references
PointerAlignment: Left
DerivePointerAlignment: false
# Other
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
SortIncludes: true
SortUsingDeclarations: true