-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
82 lines (67 loc) · 1.9 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
# Indentation
IndentWidth: 4
UseTab: Never
# Pointer and reference alignment to the left
PointerAlignment: Left
# Always put newlines on open/close of scopes (e.g., braces)
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BeforeLambdaBody: true
# Don't break string literals unless they are obscenely long
BreakStringLiterals: false
# Namespace comments at the end of closing braces
FixNamespaceComments: true
# #ifdef comments at the end of #endif
CommentPragmas: '^#.*$'
# Templates on previous line
AlwaysBreakTemplateDeclarations: true
# Newlines around 'if', 'else', 'for', etc.
IfMacros:
- 'IF'
- 'ELSE'
# Classes indented, but not namespaces or access modifiers
NamespaceIndentation: None
IndentAccessModifiers: false
AccessModifierOffset: -4
IndentCaseLabels: false
# Misc
AllowShortLoopsOnASingleLine: false
BreakBeforeBraces: Allman
ColumnLimit: 150 # You can adjust this to a more appropriate value for 'obscenely long' string literals
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
AlignAfterOpenBracket: Align
BinPackArguments: true
BinPackParameters: false
BitFieldColonSpacing: Both
SpacesBeforeTrailingComments: 2
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
MaxEmptyLinesToKeep: 2
SeparateDefinitionBlocks: Always
AllowShortEnumsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: WithoutElse
BreakConstructorInitializers: BeforeComma
AlignConsecutiveAssignments:
Enabled: true
AcrossEmptyLines: true
AcrossComments: false
AlignConsecutiveBitFields:
Enabled: true
AcrossEmptyLines: true
AcrossComments: false
Macros:
- TEST_CLASS(className)=class className
- TEST_METHOD(x)=x