-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.clang-format
More file actions
50 lines (41 loc) · 1.17 KB
/
Copy path.clang-format
File metadata and controls
50 lines (41 loc) · 1.17 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
BasedOnStyle: LLVM
Language: Cpp
# Maximum line width
ColumnLimit: 80
# Use spaces, 4-wide
IndentWidth: 4
TabWidth: 4
UseTab: Never
# Control exactly how braces are broken
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterControlStatement: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
IndentBraces: false
# Keep access specifiers (public:, private:, protected:) unindented
AccessModifierOffset: -4
# Align consecutive statements for readability
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignOperands: true
AlignTrailingComments: true
# Disallow short forms on a single line
AllowShortBlocksOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
# Break constructor initializer lists before commas
BreakConstructorInitializers: BeforeComma
# Break before binary operators (except `=`) for clarity
BreakBeforeBinaryOperators: NonAssignment
# Limit consecutive blank lines
MaxEmptyLinesToKeep: 1