-
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy path.clang-format
More file actions
65 lines (50 loc) · 1.33 KB
/
.clang-format
File metadata and controls
65 lines (50 loc) · 1.33 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
---
Language: Cpp
BasedOnStyle: LLVM
UseTab: Always
TabWidth: 4
IndentWidth: 4
ContinuationIndentWidth: 8
InsertNewlineAtEOF: true
ColumnLimit: 120
# K&R / 1TBS brace style
BreakBeforeBraces: Attach
# case labels at same indent as switch
IndentCaseLabels: true
# Pointer/reference: left-aligned (const char* name)
PointerAlignment: Left
ReferenceAlignment: Left
DerivePointerAlignment: false
# Template on its own line
AlwaysBreakTemplateDeclarations: Yes
# Constructor initializer lists: break before comma
# Foo()
# : m_a(a)
# , m_b(b)
BreakConstructorInitializers: BeforeComma
ConstructorInitializerIndentWidth: 4
# Don't reorder #includes (pch.h must stay first)
SortIncludes: Never
# Short form control
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
# Spaces
SpaceBeforeParens: ControlStatements
SpaceInEmptyBlock: false
# Access modifiers (public/private) not indented
AccessModifierOffset: -4
# Preprocessor
IndentPPDirectives: None
# Namespaces
NamespaceIndentation: None
# Align
AlignAfterOpenBracket: AlwaysBreak
AlignOperands: AlignAfterOperator
AlignTrailingComments: true
# Packing
BinPackArguments: false
BinPackParameters: false